Does BB's hair shader slow rendering down?



  • My render 0_1525299643637_Pe36VCDress_0001.png
    Hair using BB's hair shader finished in 2 hours 40 using @glossaphile's settings but I have twice as many threads but his is a mobile class CPU so probably about right.

    @glossaphile with a 2 core (4 thread) CPU you need to set your threads to 4 not 8, you will lose time swapping between threads if you use more than you have available. Could you retry your 300x300 with only 4 threads?

    Do you have a separate GPU or are you using the on CPU GPU? the later is quite often the case with laptops



  • @ghostship said in Does BB's hair shader slow rendering down?:

    @glossaphile @caisson is probably 100% correct about bucket size as he pointed out. I'm sure though that there are other problems with your render. Also the fact that my setting produced less noise is an indicator of settings that are not helping.

    the SSS in BPT set to 4 is, IMHO way too high, even for a closeup portrait. My understanding is that the values in BPT multiply the base samples setting for the different rays, so BPT with all values set to 1 is the same as disabling BPT, if you set Diffuse to 4 then for 6 samples (really 36 i.e. 6 squared) you actually do 4x36 diffuse rays, I am more than happy to be corrected by someone who actually knows about this!

    @ghostship said in Does BB's hair shader slow rendering down?:

    @glossaphile @caisson is probably 100% correct about bucket size as he pointed out. I'm sure though that there are other problems with your render. Also the fact that my setting produced less noise is an indicator of settings that are not helping.

    Your settings did 1600 difuse samples, @glossaphile's did 5 * 6 * 6=180 diffuse samples



  • Well, there are only two things to actually render in the scene Hair and head. If you hide one and the remaining one renders without problem, then you at least know where the fault lies and what settings are giving you problems.



  • Using @ghostship's settings I get
    0_1525329257457_Pe36VCDressa_0001.png
    This took 2 hours 30 mins to run



  • @amethystpendant Run it with the caustics off.



  • @amethystpendant Noise is time. Look at the amount of noise in the render with his settings. That would take more samples to resolve = an even longer render. Also, try a render with my hair shader instead.



  • Test 3: my render settings and @bagginsbill hair shaders. 67 min. Procedural hair shader ads 20 min to my render (+30% render time)
    0_1525364674342_CPU Time Test 3.jpg



  • @glossaphile Conclusions:

    1. use my rendender settings
    2. use a different hair shader setup that utilizes maps instead of math nodes.
    3. as @amethystpendant pointed out you have your CPU settings wrong. Optimize them for your machine (2 core/4 thread) and turn off separate process as there was a bug with that for Superfly that made it render slower. It's really useful for Firefly but uncheck it for Superfly.
    4. max bucket size 16, anything more and you'll choke out your CPU.


  • @eclark1849 said in Does BB's hair shader slow rendering down?:

    @amethystpendant Run it with the caustics off.

    I was testing the settings provided by @glossaphile and @ghostship they aren't my settings



  • @amethystpendant As I understand it caustics wont actually increase render times, they will increase the noise IF there is stuff that shows off the effect prominently. If you got a spotlight shining through a glass of water onto a table you will see the caustics effect and that might need a bunch more samples to resolve.



  • I just tried a render with Ghostship's settings, and I don't think my computer likes them at all. A 300x300 test render with hair froze my computer to all but a standstill. I couldn't even bring up the Task Manager properly, and that was with a foreground render. When I tried to "Render in Background," I ended up having to reboot my laptop (though that may have just been a fluke).

    Plus, the end result was noticeably noisy and took roughly just as long as the same render with my own current best attempt at optimal render settings (about half an hour).

    Ghostship, I appreciate your patient help, but in this case, I think you might just be too used to dealing with a six-core processor. Either that or there's something fundamentally wrong either with my system or with my procedures. In any case, I'll be cautiously tinkering with them to see if I can come up with something that works for me.



  • @glossaphile same settings I used on my i5 2500.
    At the very least you should follow some of the other suggestions I made. They are sound. You could also lower the max bounces and trans bounces to 16 and start with a small sample setting (like 5)



  • @ghostship I did. I'm now running 4 threads instead of 8 with "Separate process" turned off. I tried lowering Max Bounces and Max Transparent Bounces to 16. My bucket size is also 16. I've even simplified the hair shader, making it a hybrid of yours and BB's. I will now try just using your unmodified shader, which I think is the only major suggestion left.



  • @glossaphile Cool. Keep us informed.



  • Okay, here's the comparison of the same 300x300 image with hair.

    With My Current Best Settings and Shader: about 32.5 minutes
    With Ghostship's Settings and Shader (with MB and MTB tweaked to 16): about 34 minutes
    With My Settings and Ghostship's Shader: about 37 minutes

    I should note that the results of using Ghostship's settings produced mild but quite noticeable noise, particularly on the skin, though I suspect that's from Reflective Caustics, which could easily be turned off.



  • @glossaphile I would double check your settings, especially your filter glossy and clamp setting as both I and @amethystpendant got better results with my settings than yours. Probably don't need the caustics on as there aint much that needs it when you are rendering a human.



  • @glossaphile another thing that could speed up your renders is using a sky dome instead of the default ground. Turn off the ground/construct in the hierarchical menu and load up EZDome or @bagginsbill Enviroshere and light it up with a JPG (low res JPGS will give you less noise) keep the brightness fairly low and adjust your lights if you need to. Using environmental lighting like this will use less diffuse bounces and the render should be quicker and less noisy.



  • @glossaphile Here are my tests. One with skydome and the other with the default ground/construct. The one with the Envirosphere took less time and has better lighting. Every little bit counts and adds up to a better and faster render.
    0_1525411715102_Light test enviro.jpg



  • @glossaphile Did you drop the threads to 4 as suggested?



  • @amethystpendant Yes, I did.

    I think I've hit a sweet spot of sorts. With Ghostship's hair shader and these render settings...

    0_1525465184256_RenderSettings.jpg

    ...I managed to render this image in just about 5 hours and 6 minutes.

    0_1525465253124_TestSet.jpg

    Actually, prior to tweaking the hair texture map (which shouldn't have noticeably affected render speed), what was otherwise the exact same image with the exact same settings rendered in about 4.5 hours overnight. I suspect the difference was that, the second time around, I diverted some of the processing power to other tasks (YouTube videos, etc.) while I waited.

    My character is actually placed in a a whole indoor photo studio scene, so a sky dome is moot for me. Theoretically, I could use one of BB's utilities to generate a panorama for a sky dome from the original studio setup and use that, and I may yet try it. Regardless, the current render time is over 4 hours shorter than my last best attempt (9.5 hours)!

    I must confess to a bit of a hack with the hair texture. I took BB's mathematically generated hair texture (without any color) and rendered it on a prop square with the camera zoomed just right so that it filled the viewport. After a bit of editing in Photoshop to enhance the contrast, I then plugged that render as a texture map into Ghostship's shader, using it as a bump map and as a bias map, the latter of which was combined with a simple input color to form what would otherwise be the diffuse texture map.

    0_1525466317540_HairShader.jpg

    I use a Color Ramp for the base color just because it makes it easy to switch between the cardinal hair colors (black, brown, red, and blonde).