Download

Scene Capture Cube on material?

Hey all. Is it possible to output a Scene Capture Cube onto a material? I created the render target for it, but whenever I create a material out of that, the material doesn’t work, and I get this error inside the material: [SM5] (Node TextureSample) Coercion failed: Parameters.TexCoords[0].xy: float2 -> float3

Any idea what I’m doing wrong??

First, you’re going to need to use a TextureSampleParameterCube node to sample it. Then you need to use a float3 for the UVs. For example, if you wanted to wrap it around a sphere, feed the TexCoord into a UVToLongLat node, and that into UVs. If you want it to behave like a mirror, use the ReflectionVectorWS node.

Thanks for the quick response! First off, I had no idea what to do for the “float 3 for the UVs.” I probably should have stated that I’m fairly new to UE4 and a complete noob with materials. I managed to somewhat get it working by doing the other things you said, but the material looks strange. Here’s what I have now: a53b0a7ce52dda95e32adc4c273c5dd2c9bce68d.png

And here’s what the material looks like:
745b7a75804212fbd1cd64260ef69858df2b1c64.png

Am I doing something wrong??

EDIT: I managed to get it working by removing the TextureSampleParameterCube, but in-game it looks very pixelated.

0eceb540614c6738cd765e86aa121308.png

You can change the resolution of the Scene Capture Cube to something like 512 or 1080, even up to 2048 and this will give you a higher resolution output. Just double click on the SCC and change the default value to something larger. It will put more load on your system, but if you only have one or two it’s okay.

Oh, awesome, thanks!