Only render hair that are actually visible?

(Note: I posted this problem in a similar thread under “Particles”, but have got no solution yet.)

Is it possible to limit “Preparing scene data” to what is actually visible in the frame?

I have an animated scene in which the camera moves across a landscape that has grass made of particle hair. Because of the camera movement, only a small fraction of the particles is actually visible in each individual frame.

Nevertheless, in the “Preparing scene data” phase, Blender 2.78 (Internal Renderer) seems to “count” all of the particles in the whole .blend file, which takes an unnecessarily long time.

Is there a function, perhaps an addon, that will “ignore” the particles that are outside the frame?

The grass is not animated. Can Blender somehow save the result of “counting the hairs” and reuse it for all of the other frames?

Thank you!
Thomas

Hi Thomas,

Not sure if I can help but maybe this will work:

Make an object (object A) that is as big (or a little bit bigger) as the view of the camera, also in depth. Animatie so it moves with the camera. Use object A to dynamic paint the hair particle on the object it’s on. And put object A on a different layer so it will not render.
This way, I think, the particle will only show up in the part of where object A hits the emitter.

HAven’t tested it but i think it should work :slight_smile:

Hi Thijs,

Thank you very much for your reply. We have made a test, and it seems to be working! Great idea! :slight_smile:

I have also received an answer by Andy Goralczyk on the Blender Cloud blog, but that solution only works in Cycles (which I’m not using for this project):

"Sergey implemented a feature for Cosmos that allows us to cull objects by what’s visible on screen. This helped tremendously for saving memory with high poly objects (our set had lots of rocks e.g.) and also particle instances. You can find the settings in the Scene Context, under Simplify. This affects only rendering. It’s also in the manual

Use with caution, this removes objects from being exported to Cycles, so they also won’t cast shadows from off-screen (setting the right margin is important)." (https://cloud.blender.org/blog/blender-studio-podcast-058-scripting)