Video Transcript
Make your Unreal Virtual Production more realistic. A tool to match real lights with CG ones.
Greg Corson · 3,901 views 29 Nov 2022 #unrealengine #lighting #editor · Duration 11:41 · youtu.be/gvKmJ4akbbg
When you composite a real set with a virtual set, your lighting needs to match. Wouldn't it be nice if you could just point to a light in your real studio and have a matching light appear in your virtual set? Well, that's what this tutorial does! I show how to make an "Editor Utility Widget" that does this. It's very easy to make and you can customize it to do whatever you like. All you need is a tracking system that can track a second object in the scene in addition to your camera. Many tracking systems like RETracker Bliss, Vive, Optitrack, Vicon and others can do this. 00:00 Intro, example of matching lights 00:30 Create an editor utility widget to align lights 01:25 Demo of how it works
Auto-generated YouTube captions, grouped into ~45-second blocks. Product and technical terms may be misspelled. Timestamps link to the video.
hi everyone when you're doing virtual production it's really important to have the correct Lighting on both your studio and on your virtual production CG elements here you can see a robot who's been composited along with some reference balls into my studio and you can see two of the lights that are Lighting in right here and if you look at this mirrored ball you can see a third one reflected in it which is right behind the camera I'm Greg Corson and today I'm going to show you how to make a simple unreal editor tool that'll make it easier for you to align the lights in your real studio with lights in your unreal scene that you're going to do compositing with doing this entirely by hand can be a
little difficult but with this tool as long as you've got a tracking system that can track at least one object besides your camera you'll be able to do it very quickly and easily as you'll see all you need to have is a tracking system that can track something else and that will work with say a Vive and a Vive tracker or wand other VR systems and their wands something like a retract or Bliss which can track an April tag or a Vicon or optitrack system that can track pretty much anything for this tutorial I'm going to be using retracker Bliss but any of the other systems I mentioned will work just fine and here's a quick demo of how it works I just go into the studio when I pick up an April tag
put it right on the light like this click the button and now you should see that an axis has appeared showing me where to put the light and what direction it's pointed once you've marked all your lights this way you can just come back to your unreal editor select each axis find it over here in the outliner right click it choose replace selected actor with and say something like a direct light or Point light or whatever type of light you want and that'll change this axis into an actual light I've already done it in this scene for all my lights and I'll show you what that looks like if I expose what the every everything in the scene I can pan over here and you can see
there was a light and it's right at where the axis is and it's pointed in the direction that the axis is pointed so this is a very quick and easy way to get all your lights up in just a few minutes and it beats the heck out of measuring or guessing where they are or trying to align them manually once you've done this all you have to do is go into your unreal scene and set the size and brightness of each light to match the lights in your studio and you should have a pretty good lighting setup what I'm using to do this is a simple tool called an editor utility blueprint these things are really handy as I've found out and not nearly as hard to make as you might think so I'm going to show you how to make one which should work in any version of unreal the first thing you need to do is go over to settings and plugins and search for editor
scripting and make sure editor scripting utilities is turned on like it is here then into your content browser right click go to editor utilities and choose editor utility widget and you'll get the new editor utility widget which I'm going to rename to be tutorial widget now I'm going to make that simple axis object that's going to be dropped down when you press the create access button and that's really easy you just go in here you create a blueprint class tell it it's an actor class and call it axis
and open it up then just go over to the components section here click add static mesh come over where you set the static mesh click on that and put on in axis this is already in most unreal builds that you'll get so you don't have to create any graphics and you've got this axis and if you want to you can choose to scale it down a little bit it's up to you compile that save it and then close it now I've opened up the tutorial widget and you can see this is a screen used to build its UI and I'm going to start really simple I'm going
to go over here to the side and drag out a button and drop it down and then I'm going to go get a text box and drop it on top of the button so they'll be linked together and then I'll enlarge the button a bit and I'll name this axis and then I'll click in the text box go over here into the text box details and I'll change the name to create access and that's your UI now I'll create the actual blueprint logic to make this work you click on graph up here which gives you the blueprint to work with
click on access click on the on clicked button here and that adds me an on clicked event into my blueprint so that when I click on that button whatever is tied to this will run so the blueprint is actually pretty simple I just drag a wire off here and I say I want git selected actors that's going to get me whatever is selected when I click the button this return value is the list of everything selected so I drag that out and I do a git and I'm going to leave this in the default so it'll just get me the first item in the list and then I'll drag it out here
and I'll do a get act or transform and that gets me the transform or the position of the selected actor when I clicked it now I'm going to add a node to spawn the axis actor we created a little while ago so I come over here and I say I want to spawn actor from class and you get one of these I'm going to select my Axis that I made earlier then I go to this value here and split
the pin so I can get the location and rotation and I connect those up too the last thing to do is make sure that this new axis actor is attached to the same actor as the one we selected that sounds a little complicated but it's not it only takes two more nodes so we drag from here and we choose attach actor to actor we're going to take the axis we just created as the target and we're going to say that we want to keep the location world and the rotation world and then we just want to get the actor
to attach it to so I'm going to go drag a wire out here and say get attach parent actor that's whatever actor was selected this will be its parent drag that over to parent actor and we're done you can see the entire blueprint here on screen and it's obviously pretty simple all we have to do is compile it and save it now how do you use this well back in the content browser find the tutorial widget we just made right click and you'll see run editor utility widget that'll open up a window like this one with your UI in it and you can put this anywhere on your
screen or you can drag it over and dock it down here the last thing you're going to need to use this is an object that's being tracked by your tracking system in my case I'm using retracker Bliss and it's tracking an April tag which you see on the screen here and if we look at the details for that we can see this is just a simple object with a live link component in it and that's been connected to camera 101 which in the case of my Bliss comes in through live link if you've got a different tracking system like a Vive optitrac or something similar you probably already know how to create another object and attach it to something it's going to be very similar to the process you use to attach your
first tracker to the camera unfortunately right now this method only works if you have a second tracked object in the scene besides the camera so for something like a Vive this would be one of the hand controllers or an extra tracking Puck to use this all you have to do is select your tracked object in my case it's this April tag and then what I do is I put a pointer over this big create access button and then I walk into the studio with my wireless mouse position the April tag in front of the light and hit create access and again you see the axis pop up over here the process would be exactly the same if you're using some other kind of tracker like a Vive Puck you would just put it
up against the center of the light and click the button and the axis would pop up you may have noticed at the beginning of the video that my tool had three buttons and could create wrecked lights and spotlights directly that's a very simple thing to add you can add as many buttons as you like to do whatever you like just repeat the process at the beginning of the tutorial create another button then go back to the graph duplicate this blueprint attach it to the new button and change it to do whatever you'd like it to do if you wanted to be able to create say erect light directly all you need to do is Select rect light in the actor class and you're done so as you can see this is a great way to
get your lighting more correct you can see in this image for example that the small light on the side is casting hard Dark Shadows of the balls onto the robot's chest whereas the large soft box up in the top is casting softer Shadows down around his neck and shoulders this also works really well if you're doing a virtual set and you have your actors on a green screen stage you can use this method to copy the positions of the lights of your actors on the green screen stage into your unreal virtual set project so they'll be in the same place this can help a lot in getting the lighting of the set and the lighting of the people to match I hope you found this useful these editor utility widgets can be used for a whole
lot of other things as well it's a great way to have something that runs in the editor and has a simple user interface you can use to control it that's all for now remember to like comment and subscribe that really helps the channel I'll see you next time
Transcribed 16 blocks · Source: YouTube