Render object separately from rest of scene

Hey there! I have a very heavy scene to render, and it needs to contain a smoke animation, so to avoid making it heavier i made a “fake” smoke with alpha textures, i also did a similar trick with 20+ candles. But now that i want to render the animation it takes the whole scene into the render in it takes a massive amount of time to render, the scene is panoramic and in 8k resolution so the render time is understandable, but i know there must be a way to make it that i need to render the whole scene once and then render on top of that the smoke animation masked or something. I really hope that someone could help me with this here:)

Place it on separate layer and set up new render layer which only uses that layer and excludes all others. Don’t set other layers to mask it or anything. This way other objects are not loaded for rendering.

I want it to be affected by the scene, like cut parts that are behind somethings, would it do that if other objects dont mask it?

No it wouldn’t. But masking needs geometry loaded for rendering, so you gain nothing. One way would be to separate objects that you absolutely need for masking into another layer and use only that as mask.

You don’t want the rest of the scene to render every frame.

Pre-render two images called Background and Foreground. Foreground needs an alphalayer, as this will go infront of your smoke.

You can use an object with a holdout material to blank out the bits which need to be hidden in the foreground image.

Also - to save time forther - all you need from the foreground image is the alphalayer, so you can turn the samples down to about 8 for that one (you still need a few for anti-aliasing).

What about objects that are in the smoke? Like a wall that intersects with it from behind.

I do gain something because it needs only the geometry not the materials right? Is there any point in the direction im suggesting?

Objects that are inside the smoke… I think they will have to be rendered with the smoke I’m afraid. You can trey using a mask layer like kesonmis suggests, but I’d do a test first, as I don’t know if it will work with volumetrics.