Hi folks. Can anyone help me with a brief description of how to execute this technique?
I’m trying to duplicate the beautiful ray tracing effects seen in the inspiring Porsche Speed of Light demo. Specifically I am trying to connect an animated image sequence into the texture slot of a rectangle light which will be seen sharp in reflections, yet cast a nice soft, ever-changing light onto the scene. Just like a giant TV screen would - as seen in Porsche: Speed of Light. https://www.youtube.com/watch?v=QmbvSkBBrmI
Unfortunately I am having no luck with any method I can think of. The most logical method to me is to create a media texture based on an exr image sequence, using a media track in the level sequence to play it back as described here Using Media Tracks | Unreal Engine Documentation. Then I drag-drop this media texture onto the light. As you can see from the attached image the result is always horribly wrong, no matter how I go about doing it. The light no longer behaves like a soft area light, but more like a hard-edged film projector with non-physical results.
François Antoine and Min Jie Wu gave a talk on their Porsche piece for Nvidia called “Deconstructing the Speed of Light”, unfortunately the video recording of this session picks up after the section in question. http://on-demand.gputechconf.com/gtc-cn/2018/pdf/CH8807.pdf
Does anyone know how to plug animated image sequences into ray traced area lights and get appealing results?
Thanks for the tip PrHangs. I will certainly start researching the capabilities of light functions, not having used them yet.
The initial impressions aren’t great though as line one in the documentation says “It should be noted however that you cannot change the color of lights using a Light Function”. This is precisely the effect I am trying to achieve. As various regions of the giant tv screen light up with red, green, blue in the image sequence, they should automatically spill soft red green and blue light into my scene. Here’s a demo of the effect working perfectly with a non-animating texture, no light functions, just a plain rectangle light. I just need exactly this behaviour, but with the texture derived from a sequence of images, not one static image.
They used a media player as texture. With that, you can put a video into the source texture slot (NOT into the light function) and animate your light color.
I used this tutorial for TV screens to create my video/media player, which i then put into the rect light.
Tutorial (i followed it until the 4.20 minute mark, but the rest should be interesting too):
Thanks Suthriel. That tutorial video you linked to is a good source of information about how I can use light functions to create the effect I’m going for. So big thanks for that!
BUT unfortunately his technique is a hack that involves creating three lights (red, green, blue) where you’d normally need one to get around the fact that light functions can’t handle colour. So that’s a 3x performance hit, which for ray tracing area lights is a big deal.
You mention that Porsche used a Media Player as a texture (not a light function). But when I do that my nice soft area light just turns into a movie projector. This problem is demonstrated very clearly in your own result video. Your rectangle light is somehow magically projecting a perfectly legible image of peoples faces etc onto the floor - like a projector. A real TV screen has no lens in front of it, and therefore it just makes a soft blob of coloured light (which the tutorial creates with blur filters, light functions, 3x the needed number of lights etc). I’m lighting my scene with multiple giant video walls, so the difference is huge.
I don’t want to be dismissive of your very helpful answer - you have given me a way forward! But I’m still wondering if the Porsche guys were doing something a little less “hacky” than creating source texture cameras to film their screen, duplicating the light 3 times, etc.
Seems to me like it’s a flat plane with the media texture for the emissive. Most of the light coming from it seems to be more specular than diffuse which also suggests it’s a dim emissive compared to a direct light source. Also if you look at the “Light Studio” tool on screen there are only 2 light sources visible: the overhead light and the one that is rotated around to the back.
Ok, that blurry lighting… dunno ^.^ But if you look at this clip here, were they show an interactive demo with the used lights, then you can see, that their floor is quite reflective/metallic, and does reflect a pretty clear and sharp image of the background TV and the car itself (1 minute mark) :
Maybe the pdf contains some hint, because those boxes, they are moving, seem to be a combination of rectangular light and an emissive plane. Take a look at page 56, where one of those boxes is marked, and what it contains. BP_LightFree contains a RectLight and a Plane.
Have tested it with an emissive plane instead of a rect light, and maybe with a better GPU and more samples and more bounces for reflection and Global Illumination, it could look closer to your desired TV screen:
Edit: The only other way i can think of, would be to create a blurry video copy, that you use for the rect light, and the normal sharp video for the emissive plane for the reflections.
That has to go down as the most helpful answer I have ever received on a forum. To go to the trouble of actually mocking up my setup and then making a movie of it for me to watch…I’m stunned. And your results really do look like the Porsche reference. Amazing effort. I also like your suggestion about pre-blurring an image sequence, I’m going to try that because it’s easy to automate in Nuke and it would mean the soft illumination would be occurring with primary rays, not just reflections and GI, which might help it interact better with more shaders in the scene.
I’m on a work-supplied 2080ti, and I’m rendering stuff non-realtime in the end, so I can afford some higher sample settings.
Also thanks to you rosegoldslugs - I think your analysis is accurate and is in line with Suthriel’s demo. I might also cook up a custom bloom kurnel, because looking closely at the Porsche light studio, some of what looks like illumination from the video wall is actually light wrap from the bloom.
Thanks heaps to the 2 of you - I’m looking forward to trying it all out at work today!
Just a quick follow-up. Suthriel and rosegoldslugs, your suggestions were on the money.
An emissive plane with the media player texture on it gets you half of the way there. You can see it affecting all reflective surfaces, including ones with blurry reflections. But it has a limitation - it is not a genuine source of light. Therefore the diffuse component of all shaders do not seem to receive illumination from this plane as far as I can see. Some objects, like my seats, come out essentially black not matter how bright this emissive plane is.
So the second half of your Suthriel’s solution kicks in. I pre-blurred the same image sequence and fed that into a rectangle light’s texture slot. This does a pretty good job of mimicking the effect of a truly textured area light source. This technique has two limitations. 1. you have to manually double handle all images sequences to pre-blur them, import them, hook them up, trigger them in a level sequence etc. 2. There doesn’t seem to be a way to tell a rectangle light NOT to appear in reflections. So your nice, sharp reflections from the emissive plane are doubled up with soft reflections of the rectangle light. But in terms of the rendered images, this compromise is not huge.
So thanks guys for un-blocking me and letting me get back to making cool pictures. I wrapped up the above technique into a blueprint light/plane actor for easier handling.
If anyone out there knows how to get image sequences playing as the texture on a ray traced rectangle light, per the original question, please pitch in. The results would be visually superior and the need to double handle all image sequences would disappear.
There are indeed two settings in all lights, that you can toggle, that WILL affect their reflections. The first and most important is called “Specular Scale”, the other is a switch that is called “Affect raytraced reflections”.
Video, cuz it´s easier to see their effect with moving pics the “affect reflection” is most noticeable around the front area of the car :
Im noticing alot that is going wrong with the rect light… First the light texture come out warped? Its looking like a sphere map, im guessing its build off the attenuation of the light. is there a way to flatten it out? would be nice if it was just a projected image that is linear. Second, when i start to close the barn doors its like the light bounces off of them and creates artifacts onto the surface. Third its not really matching the texture, even though its the same content. Starting at random places, mirrored and duplicated. Im using a very basic chaser in a media player and also as my source texture in the rect light.
Ill post an example. It may be that this feature just isnt sorted completely? or maybe there are some rect light tips i should follow?
hey mate, sorry to butt in a few years later but I cannot find this PDF you guys posted (nvidia took it down if you look at the link), would you happen to have it saved somewhere? thanks
Hey there, and unfortunately no, i had not saved it. But nowadays, things also have changed quite a bit, thanks to Lumen and UE 5.5. Megalights
Now if you use Megalights, you pretty much just need a RectLight with a texture, and if you want “see” the light, attach an emissive plane to it, that uses the same texture. Even without raytracing you can now get really good lights and reflections out of the box.
That plane is a regular plane with an emissive texture, and an identical sized rectlight, in UE 5.5. with megalights enabled, no raytracing activated. The cubes are 2 metallic cubes, the left one with 0.25 roughness, the other with zero, and the cylinder is a white plastic material.