Hair does not cast shadows

Hey, question about hair. How do you get it to cast shadows? I’ve set the objects to “receive transparent” since my hair does have a transparency amount as do the curtains but my model looks bald on the wall behind him. :frowning:

I’m using blender 2.61 (I believe) and rendering with blender render since cycles doesn’t work so well on my unsupported video card. <sigh>

Anyway, so what’s the prob? Any ideas?

Okay, I think I figured it out.

In order to get hair to cast shadows, there are two settings you must choose.

In the PARTICLE SYSTEM, you must NOT choose “strand render” in the render section. Instead, use “Adaptive Render.” This will cut the time of the render down (which is the purpose of “strand render” but also allow shadow). I left the “Adaptive Render” options at default.

In the material section, under OPTIONS, check the “traceable” box. This will tell blender to trace the shadow and/or reflection of the material onto a reflective or shadow-receivable object.


I turned off “Strand Render” and turned on “Traceable” and after 12 minutes of staring at the “raytree…building” step in the render, i finally had to cancel with no rendering done at all. So it is that important to remember those two settings.

I hope this helps more than it confuses. Blend away, Blenderers! :smiley:

WITH ADAPTIVE RENDER notice that the render times do vary some which is a trade-off to get the shadow.


Both images are with “traceable” selected. Ignore the panel windows which show that both are set to “strand render” because I simply switched between two render slots to capture the image after rendering both.

Another way to get hair to shadow without using Adaptive Render, and still have somewhat reasonable render times, is to use a special hair system that renders only the shadows, using Traceable as mentioned. The “beauty wig” that renders the hair itself uses Strand Render for speed. The “shadow wig” is a dupe of the beauty wig and uses the same parent strands but far fewer children, and its material is set to not render anything but the shadows. I often thicken the Strand specs in the shadow wig’s material as well. It still takes a considerable amount of time to render, so it may not be highly suited to animation, but the results can be very convincing and the render times (compared to having the entire beauty wig traceable) can be reduced by a factor of 100 or more. It also cuts down on memory demands since less is being raytraced.

Interesting, thank you both

You can Render Shadows with Strand Render but it only works with Buffer Shadow Spotlights. It works with all buffer types expect Irregular.

As far as the spotlights, that’s good to know if you want to do the four-point lighting but I dunno enough about that yet. Still working out the kinks in it so I’ll definitely keep that in mind.

Chipmasque, are you saying to add a second particle system and making it shadow render only? If so, wouldn’t that take up a lot more processing time for rendering? Or am I reading wrong?

Yes, use a second particle system, for only the shadows. The shadow-only system has many fewer child particles, like 1/10 or less, which cuts down on render time compared to the “beauty” hair system when using Traceable. The “beauty” system uses Strand Render, which is very fast and can handle a dense child strand population. I found it isn’t necessary for every rendered “beauty” strand (parent or child) to cast a shadow for the shadows to still look natural:

I developed this approach mainly to avoid the RAM starvation problem trying to render the entire beauty hair system with Traceable would always cause. I haven’t tried using Adaptive Rendering yet, it may be more efficient, once I get back to my Nezina project I’ll give it a try.

Okay, I tried to run a comparison between the two methods but for some reason it doesn’t seem to be rendering the “beauty wig.” I’ve separated them but nothing.

I clicked the “plus” to create a second particle system then clicked the icon beside “Settings.” After that, I clicked the number 2 to create the separation then set the new material to the new system. Isn’t that the correct way?

It’s not how I did it but I don’t see a reason why it wouldn’t work, from reading your description. I’d have to try the dual particle system on the same emitter approach to see where any pitfalls may lay.

I simply duplicated the entire emitter mesh and re-spec’d the particle system’s child strand count and materials. I always use “wig” emitters, separate from the character’s head mesh, as it gives me more control over how the hair sits on the head. A dupe is also easier if you’re still doing some editing on the beauty mesh. Nezina’s hair went through some significant changes over time, from completely straight to a little wavy, from extraordinarily long to cut short at the shoulders. Using a second particle system would mean having to match all these changes with every edit to the beauty system. Using a dupe, all that needs to be done is unchecking Strand Render, altering the child strand count, and switching the material, very quick to do. That way, the parent strands are always exactly the same for the two “wigs,” which helps keep the shadows looking correct.

ah, okay, so you have a shadow and a beauty character mesh too then. so in theory, i could just dup the scalp which contains the particles and set one scalp to invisible while the particles to it are set to cast only. everything else should be exact, right?

Only one character mesh, no need for a dupe of that, since it has no hair of its own. When first creating hair for the Nezina character, I duped the scalp polygons and made the dupe an emitter for the hair particle system. This is what I call a “wig.” I set up the particle system and its materials so it looks good when rendered using Strand Render, not Traceable, and no shadows. This is the “beauty wig.” I then dupe only the beauty wig to make a “shadow-casting wig,” on which I disable Strand Render, reduce the child particle count drastically, and switch to a Traceable material that is set to only cast shadows.

Since the beauty wig is not raytraced it renders relatively fast even when it has many thousands of parent strands/child strands. The shadow-casting wig does demand a lot of RAM and does take considerable time, since it is raytraced, but the reduced child particle count makes rendering it feasible. Trying to render the entire beauty wig as Traceable would inevitably crash Blender on my RAM-deficient system, so I found this workaround. Not sure how it compares in use of rendering resources and visual result to using the Adaptive Rendering option. All three of my machines are tied up rendering animation frames right now or I’d do a test myself.

Lol, my machine is likewise occupied. It seems that when I’m not rendering, i’m baking. lol anyway, that’s basically what I was thinking about just dup’ing the scalp but didn’t realize that you had done it before adding any particles at all. great idea!

i’ll try it later when my machine is finished. it should eliminate the demon eyes completely from the background shadow this way.

and, since my Calimar’s hair is short, i have fewer parent particles than I’m sure Nezina has as well as not nearly as many vertices so that should also help keep render time down. The current close up scene that i’m working on is taking approx. 6-7 minutes per frame, this will probably cut that in half since i’ll be able to do strand render AND trace so many fewer hair particles!

<sigh> do you by any chance have a work-around for meshes with shape keys? mine has several so I don’t have a way to separate it.

I’m half-tempted to cancel my render and test it. lol

Yeah, the shape keys limitation can be a pain. Possible workaround: duplicate the entire character mesh, remove the dupe’s shape keys and delete all but the “wig” polygons. Takes a little longer but does work, at least for my characters (did this with Kata as well). All the armature-related modifiers will still be in place, btw, which can be helpful. So also will all the Vertex Groups (even if completely empty) which can be another pain to deal with, but usually that can just be ignored.

I usually do all this stuff with the character in its binding pose (i.e., Rest Position) and often with the armature modifier disabled, btw. Simplifies the process in most cases.

okay, i had completely forgot about doing that. i had done it once before a long time ago but, you’re right, it can be a pain. the good point of course, is that the armature is already in place.

however, what i did was simply create a plane object, sculpt it around the scalp then assigned the particle system to it and parented it to the neck bone since that will be the only bone that has an affect on it.

This seems to work as well, however, having the two plane objects, (beauty and shadow) seems to be giving me fits. I’m trying to work around that. I may have to completely redo the hair but that shouldn’t be much of a problem.

Thanks for sticking with me through this. I hope it not only helps me but others who may have similar problems.

btw, I LOVE BLENDER! lol

Okay, so here’s what I did:

To eliminate the demon shadow eyes, I simply inserted a sphere inside my character’s head and set it to my “shadow wig” material, which effectively cut it out.

***If you use this plan, make sure that the particle hair system is set NOT to render the emitter. If you use the character’s mesh and the two particle systems, make sure that the emitter IS checked to render.

Steps for the hair and shadow:

I forgot an important step. Before Duplicating, make sure that you use a shrinkwrap modifier to get the hair object exactly molded to the correct area of the character mesh. This should be step 8.

1: Create a plane and sculpt around the area to have hair. (i.e. the scalp)
2: Create particle system 1
3: Style particle system 1
4: Set to “strand render” and “b-line” in the render section.
5: Set number of children to be rendered.
6: Create hair material
7: Parent scalp to character armature (i parented to the neck bone since this is the bone that will control the rotation of the scalp in all directions.
8: <Shft> D to duplicate layer
9: Click “+” beside “settings” in particle system. (This creates the second particle system which will be the shadow system)
10: Multiply number of render children by .1 (i.e. 500 * .1 = 50)
11: Set new number for render children
12: Create hair shadow material
13: Set hair shadow material to “cast only” in the shadow section and be sure the “traceable” box is checked in the options section.

If I’ve forgotten anything, please let me know so I can amend the procedure. This should give you a result similar to this:

Theoretically, this should be possible with using only the character mesh, however, when I tried it, I was unsuccessful. If someone can try it and post the results, that would be great!

Again, thanks a lot, Chipmasque for this incredible work around!

One tip I could have mentioned regarding duping the “beauty” wig to make the “shadow” wig, but forgot – in User Preferences you can set Bender to duplicate the particle system with your mesh duplicate. This will make creating a new particle system (your step 9) unnecessary as the duping process does it for you, Then you only have to switch the child count, the material, and disable Strand Render.

ah sweet! that will definitely make my future characters easier to do! Thanks…again! :slight_smile:

chipmasque, did you get my message?

You guys saved me a lot of (my own) hair with this solution and therefore I thank you very much :slight_smile:
It works!

Does anyone know a way to get this to work with edited hair? As soon as you edit it appears to lock the particle settings panel until you free the edit. This is making my current projects render times quite high. I wouldn’t mind it so much, as it will be a still image, but it’s making fine tweaking quite a pain.