I am trying to make a cockpit with a glass canopy which reflects the lights of the various instruments in the cockpit. I’ve creted a translucent material, with screen space reflections enabled, placed a reflection capture sphere actor in there, but still no reflections…
Any suggestions?
Relying on screen space reflections in this case won’t give you what you want. SSR can only reflect what is present on the screen. In the case, where you are looking above, and cockpit dashboard is not in the frame, it won’t be reflected. What you need is a cubemap, rendered out from the cockpit, and injected into your glass material.
You want a reflection capture actor in the center of the cockpit, and you don’t want to use screen-space reflections.
Yeah well I have the reflection actor in the cockpit, it says so in the OP.
I have tried with and without screen space reflections.
There simply are none.
I have created a scene capture component cube, and in my glass material I have a Custom Reflection Vector node into the texture UVs. This is showing the cube map, and looks pretty good, but when my vehicle moves and rotates, the reflextions are moving and rotating in some way too. The scene capture component cube is a child of the cockpit, just like my camera is, which is rotating correctly with the mesh. But the reflections are moving oddly, I dont think they are static in the world, nor are they static relative to the cockpit (as i expected)… any ideas?
What material properties are you using on the glass? Make roughness black, and make sure specularity and/or metal is white or close to it?
Also, what is outside the glass? If the outside is bright, it may drown out any visible reflections.
Finally, this is actually a quite challenging setup, because a reflection capture will think that controls that are “ahead” will be reflected from glancing surfaces, as it uses math from a sphere in the center. The cockpit will then mainly show reflections from what’s on the floor and behind you.
Perhaps try creating a custom reflection map that takes this into account, and use that? Use a reflection sampler from this custom map, and plug it into the emissive channel to add it to the output color.
Oh, seems to work now, the reotation had something to do with physics actors colliding…
I deleted a few things I didn’t need and now the reflections look good, but they are upside down… rotating the capture cube doesnt have an effect. Can i flip the World Reflection V
I think I am going to avoid the reflection capture actor since the capture cube is nearly working…
The outside will always be quite dark, which is why it’s extremely important that I get all the emissive cockpit textures to reflect.
Yeah reflection vector and cubemap in material is the right way to go. This is especially true, if you want dynamic changes in dashboard displays/lights to be reflected. You could flip ref vector or UVs you are using to sample cubemap and check if it helps. Also, I’m not sure but reflection vector is world space, so you might need to transform it to local aircraft space to make your reflections react to aircraft motion properly.
Realtime cube capture is expensive as hell however, so you would probably need to think about baking the cubemap once and inventing some fakery regarding feedback from dashboard light/switches/display changes to the reflection.
If you set the resolution of the cubemap small (128, say) and set the distance to short (1000 units, say,) it doesn’t have to be THAT expensive.
The only way to know whether it’s worth it TO YOU is to try it, and measure it on your target hardware, and compare it to the experience of a fixed map.
Are you guys sure that cube mapping correctly renders the reflections when the viewer is on the INSIDE of a shiny sphere?
I just spent my lunch break with my head inside a very shiny metal fruit bowl, much to the amusement of my co-workers, and noticed that when the object being reflected at surface point A is more than the radius from A (ie, closer to the opposite side) the reflection is upside down, but left-right correct. UE4 got this bit right. But for reflections in a surface at point A where the object is less than r away, ie, something close to the surface, then I am not seeing a reflection at all. It’s ONLY showing on the opposite side (greater than r). This means that with my current setup I am only seeing inverted reflections, no left-right reflections. Can my UV map affect this? Is something else wrong? Or am I misunderstanding something here, and what might that be? In my experiments with the fruit bowl I have generally had my head at distance greater than r…
The overall effect wasn’t as mindblowing as I’d hoped, so I’ll probably go and fake the reflections completely, but I am still curious to understand why the cubemap reflections don’t work as I expected.