Reducing memory consumption with hair particles

Hi,

I’m working on a scene that shows a horse in a pasture. I’m using hair particles for both the horse’s hair and the grass. This seems to require a very large number of particles in order to get a satisfactory result, and it’s using a very large amount of memory. To render the horse alone (without the grass) requires the whole 8 GB of RAM I have available.

Obviously I could render the horse and pasture in two passes and composite them together afterward…but even horse or grass alone pushes the limits of my computer. Are there other ways to reduce memory consumption with large numbers of hair particles?

John Haiducek

Which render engine?

For context, here is what the scene looks like. First the horse with hair, next a hairless horse but with grass in the background.

The grass has 10,000 particles with 200 children. I think that means 2,000,000 strands (is that correct)?

The horse has 16,000 particles with 150 children, plus another 4,000 with 2 children in the mane. (2,408,000 total?)


So far every attempt I’ve made to do this with fewer particles has resulted in too much of the horse’s skin showing through the hair, or too much dirt showing through the grass. Of course I can compensate for that by increasing the width of the strands, but I don’t want to do that because in some places (particularly around the nose and eyes) the hairs look too thick as it is.

I’m rendering this using Cycles, with the following settings:

Strand Render: On
Child Simplification: Off
B-Spline: Off for hair and grass, On for the mane
Primitive: Line Segments
Shape: Ribbons
Cull backfaces: Off
Thickness:
Hair: Root: 0.50, Tip: 0.20
Mane: Root: 1.00, Tip: 0.20
Grass: Root: 8.0, Tip: 1.0
Scaling: 0.01
Close Tip: On

Attachments


I’m rendering with Cycles (in case that fact got lost in my fairly long previous reply). I haven’t tried rendering this scene with Blender Internal.

Have you tried putting the grass in a separate scene then compositing the two back together at the end of the render?

As I said in the beginning, I know I can render separately and composite but I’m looking for other ways to reduce the memory consumption because either scene by itself consumes about 8 GB of memory…if I add any more details to the scene it will be too much for my computer.

For the horses main fur:
How many segments in each hair ->lower it to 2
Display steps -> lower to 2
uncheck ‘close tip’ give the tip some thickness
use an image texture for the skin with some noise in it, which lets you lower the number while mainting the illusion.
add randomness to the children…

Photox, thanks for those suggestions. I hadn’t noticed the Steps setting. I’ve made a number of edits to the hair, is there a way to lower steps without destroying my edits?

Not that I know of. It’s a re-comb.

here’s a tileable horse skin texture I made, it’s full size, just download it directly from this post. you could do the same thing procedurally. Of course you could just add some gloss to it for the GPU fur. This is tiled 3 times (using the mapping node)



Memory consumption has gone down by half, without changing anything really (scratches head). But now large sections of the hair are suddenly not visible through the skin, even when I go back to what I thought were the same settings I had before. They look fine in particle edit mode, but everywhere else they look terrible. Aaaah!

Ok, particle systems on this mesh are messed up no matter what I do (even deleting the particle system and making a new one gets me a bizarre result), but when I append the horse object to a new .blend, everything looks fine again, including the hairs. So apparently I’ve found a bug.

Funny things can happen when you push your memory limits. One thing that can free up a lot of memory is reducing the number of ‘undo’ (Ctrl-z)s that blender keeps in memory. File->User prefs->Edtiting->Steps. When I push a scene to the limit, I knock that down to 2 or 3 and just make sure I don’t * up.

The other possibility is that you had baked the hair dynamics, and that will override all styling, free bake under cache to fix it.

Thanks for those tips. I will probably try reducing the undo levels, there’s little use for having a large number of undo levels on a large scene like this; Blender takes too long to wait for it to load the new states to be worth un-doing more than once or two actions.

It turns out that the problem of the “disappearing” hairs was caused by a wind force field that I added to adjust the angle of the grass…it pushed some of the horse’s hairs flush with the skin, making them nearly invisible. I turned the field weight for wind down to zero for the hair and mane particle systems and that got the hair back to normal.

I have the memory consumption down around 3 GB now. Still needs some details added in order to look more realistic but I can do that without killing my computer now :slight_smile:

Thank you everyone for your suggestions, especially Photox!