It sounds like you’re encountering a common issue where the Blueprint events and the Sequencer rendering process are running asynchronously, which causes your Blueprint changes (such as moving meshes, adjusting lights, etc.) to happen too late, after the rendering has already begun. This results in visual issues like meshes blocking the camera or objects appearing partially translucent during rendering.
I imagine everything I’m about to write to you is boring but I speak to you from personal experience, I invite you to follow a whole series of steps.
To solve this, you need a way to ensure that your Blueprint events are fully executed before the frame rendering begins. There are a few potential solutions you can try:
- Use the Sequencer to Trigger Blueprint Events Synchronously
The simplest way to ensure that the Blueprint event finishes before rendering begins is to make sure it’s triggered at the right time in the Sequencer. You can do this by:
Adding Event Tracks: In the Sequencer, use Event Tracks to directly trigger Blueprint events. This ensures that the event is triggered at a specific frame and allows you to time the changes precisely with the rendering process.
Right-click on your Track in the Sequencer and add an Event Track.
Create an event in your Blueprint that contains the necessary changes (e.g., moving a mesh, adjusting lighting).
Ensure the event is timed to fire before the rendering of the frame that it affects. You might need to move the event slightly earlier in the timeline to account for the delay.
2. Force the Blueprint to Complete Before Rendering
If the above doesn’t work as expected (or if there’s some asynchronous behavior within the Blueprint itself), you can ensure that the changes happen in pre-render by using a function to block the rendering process until your changes are complete.
Two approaches:
Use a Delay node (or “Wait”) in Blueprints to ensure that the render waits for the necessary changes to occur. You can specify a short delay in your Blueprint script to allow the event to finish before rendering.
Event-driven synchronization: Consider setting up flags or signals that notify the Sequencer or the render pipeline when the Blueprint operations are complete. This can be achieved using a custom synchronization logic within your game loop, ensuring the rendering waits until everything has been moved/adjusted.
- Force a Frame Update
Sometimes the issue happens because the Blueprint changes don’t immediately propagate. To address this, you can force the engine to update the frame after making changes. You can do this in Blueprint by using:
Flush Rendering Commands: This node ensures that any pending rendering commands in the pipeline are processed immediately. You can add this after your Blueprint logic that moves meshes or adjusts the scene.
blueprint code:
FlushRenderingCommands
This ensures that all rendering operations related to the changes are processed immediately, instead of being queued up after rendering has already started.
- Use Sequencer Bake Transform/Properties
If your Blueprint is manipulating actor transforms, consider baking the transforms in the Sequencer instead of handling it purely in Blueprints. This way, the Sequencer directly controls the movement of the meshes, which will ensure everything is aligned during the render.
Right-click on the actor track in Sequencer, and choose Bake Transform.
This will bake the movement or changes into the Sequencer’s timeline, ensuring it’s handled in sync with the rendering process.
6. Sequencer Render Settings
Another approach would be to experiment with rendering settings:
In the Movie Render Queue, under Settings, try tweaking Anti-Aliasing settings, sample counts, or other parameters related to temporal processing. The issue you’re describing, where the blocking mesh becomes translucent during rendering, sounds like it may be related to temporal accumulation not syncing well with object transformations.
Ensure that “Temporal Sample Count” isn’t too high (or unnecessary) for the given task, as high values can cause artifacts if changes are happening during the rendering process.
- Break Down Your Operations
If the operations you’re doing (e.g., moving a mesh, switching light channels, adjusting lights) are highly complex and can’t be done solely in Sequencer, consider breaking them down into smaller, more manageable events that are triggered over a few frames instead of all at once. This can reduce the chances of asynchrony affecting your render.
Summary of Steps:
Trigger Blueprint Events earlier in Sequencer via Event Tracks.
Use Flush Rendering Commands to ensure the scene is updated before rendering.
Consider Baking Transforms directly into the Sequencer for mesh movement.
Adjust Movie Render Queue settings to minimize artifacts from async operations.
Break down your Blueprint changes into smaller events to ensure they complete before the frame render.
Cheers and let me know