Exclude meshes from screen recording

Is there a way to exclude certain meshes from a screen recording? Specifically I want to exclude CSSRenderer meshes from the recording (since they will just show up as black boxes) while still allowing the user to view those meshes in the scene while recording. Options I have thought of:

  • Render scene to offscreen canvas (disabling the meshes) and record it
  • An option to record using a different camera (that excludes the meshes) than the one currently being viewed
  • Record using a different viewport (whether displayed or not)
  • Screenshot using a camera with a layer mask that excludes the meshes and stich together with ffmpeg. Does the camera need to be displayed or can this be done offscreen?

Setting up a rtt / 2nd camera and passing in a filter to the draw list i think is the way to go. Or alternatively, you could use some hacks to draw the html content to an image then it’ll actually record. Or use a screen recorder from outside the browser i suppose would work too if thats possible for your use case

2 Likes