I often create series of still rendered images in 3ds Max for clients for their medical device instruction manuals. I may have 100 or more images in a project, to be rendered from various cameras, all with a single frame duration. I’m migrating to UE4 for rendering (and I’m a noob at UE4), so after I migrate my project from 3ds Max to UE4, I want to set up all the shots either in Sequencer or in the movie render menu, but not have to manually add each camera cut. I have the raw data for frame numbers and camera names in an Excel spreadsheet, so I’d like to come up with a way to import and read that Excel sheet or a csv into UE4 and use that to drive my camera cuts, camera selection, duration, etc. Sort of like an Editing Decision List. Then be able to render the entire series at one time, automatically switching cameras as required, and driven by the csv. Is this possible? And could someone point me in the right direction to figure this out? Am I overthinking this or making it too difficult? Super simple csv screenshot attached as an example.
There’s a few ways you could do this. One way is through python by generating or regenerating the sequence you want. You can do these things in python:
- Do you have all the cameras in your level already? If not, you could write a script to create all the cameras and set their positions.
- Create a camera cut track and for each camera in your csv, create a camera cut section.
- For each camera cut section, you’ll need to know the time/frame to cut and get a reference to the camera to cut to. If you created your cameras in your script, you should be able to get the binding ID easily. If the camera actors are already in your level, you’ll need to add them to Sequencer and get the binding ID when you add it.
- For rendering, we’ve added some python capability for Movie Render Pipeline in 4.26, but the docs for it aren’t ready yet. So you’ll need to wait a bit for that.
We have some example python scripts in the Engine build here: Engine\Plugins\MovieScene\SequencerScripting\Content\Python\sequencer_examples.py
Here’s what adding a camera cut track and section looks like:
# Add a camera cut track for this camera camera_cut_section = camera_cut_track.add_section() camera_cut_section.set_start_frame_seconds(0) camera_cut_section.set_end_frame_seconds(length_seconds) camera_binding_id = unreal.MovieSceneObjectBindingID() camera_binding_id.set_editor_property("Guid", binding.get_id()) camera_cut_section.set_editor_property("CameraBindingID", camera_binding_id)
Thank you Max!