Does BB's hair shader slow rendering down?



  • @glossaphile remember to implement changes ONE AT A TIME and test render times with a smaller doc size and sample count so you can test quickly.



  • @anomalaus As far as Superfly is concerned, Pixel samples determine the number of light paths the render engine traces. The number is squared. So for each Pixel sample the number of light paths traces by that number. For a Pixel sample of 4 the number of Light Paths is 16. 5 samples equals 25 light paths, 6 equals 36 light paths and so on. The higher the Pixel sample, the longer the render and the better the quality of the Render.

    Bucket size merely determines the size of the area being rendered at any one time. That size is determined by the Pixel count. So a bucket size of 16 x 16 is one with 16 pixels wide by 16 pixels high.



  • @ghostship That is essentially what I'm doing right now. So far, I can get decent-quality 300x300 render with little or no hair to clock out at around 20 minutes. I'm trying the first one with hair as we speak.



  • @glossaphile When I do test renders they run only 1 or 2 min. Test quickly and change settings. Set your overall samples low, turn off branch path tracing to make the render faster. It does not matter that the end results are noisy, only that you are making incremental changes and making a note of render times (from the log)



  • I tried lowering Max Transparency Bounces, and I got some weirdness in the eyelashes, so that won't work. Still, I got it to a point where I can get a smooth 300x300 image with hair (including BB's shader) in about 45 minutes. Since nine 300x300 images can fit inside a single 900x900 image, that should translate to about seven hours for a 900x900 portrait with hair (assuming it scales up the way I think it does). I'll test it tonight.



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

    I tried lowering Max Transparency Bounces, and I got some weirdness in the eyelashes, so that won't work. Still, I got it to a point where I can get a smooth 300x300 image with hair (including BB's shader) in about 45 minutes. Since nine 300x300 images can fit inside a single 900x900 image, that should translate to about seven hours for a 900x900 portrait with hair (assuming it scales up the way I think it does). I'll test it tonight.

    Their is a point of diminishing returns for Transparency bounces. If you lower it too much the transparency will render black, which kinda defeats the purpose. :)



  • Out of curiosity, does anyone know why trans-mapped hair is slower in general? I would've thought mapped transparency would be one of the easiest things for a computer to deal with (certainly easier than the complex math of, say, SSS or Fresnel reflection), but instead, it seems to be one of the hardest. Why is that? Even with multiple layers, how hard can it really be to just blend the object's color with that of what's directly behind it (along the light ray vector) in direct proportion to the lightness of the corresponding point on the map?



  • I think I've whittled it down about as far as I can. This portrait of Elvis finished in just under 9.5 hours with these render settings.

    0_1525283157158_Elvis4.jpg

    0_1525283203208_RenderSettings4.jpg


  • Poser Ambassadors

    I think the problem is called overdraw: when a render pixel falls on an area where there are multiple overlapping transparencies the calculations for that pixel will be repeated multiple times.

    So if you are rendering on CPU with a large bucket size it is possible to end up with a single bucket that takes much longer time to complete than the rest of the render; having smaller buckets can reduce this chance. With GPU it doesn't matter as only one bucket will be done at a time so you use the largest possible (depending I think on how much VRAM there is on the card).



  • @glossaphile I'm running a test image at 900x900 right now with my settings. I'll also run some tests with your settings and see what's going on. 9.5 hours is way too long for that small of an image.



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

    @glossaphile I'm running a test image at 900x900 right now with my settings. I'll also run some tests with your settings and see what's going on. 9.5 hours is way too long for that small of an image.

    I'm doing the same :)

    @glossaphile stupid question but you are using all 8 threads on your CPU aren't you?
    0_1525288393133_9dc46c6b-d2db-43e2-b9a3-1b1e63c80d7f-image.png

    BTW what light setup are you using?



  • @glossaphile Here is my first test. 47 min. Yes, different CPU, different lights, model , shaders etc. Now I will run this with your settings and see how long that takes. Running the test with my settings first gives me a base time to compare to with your settings.
    0_1525290137590_CPU Time Test 1.jpg



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

    @glossaphile stupid question but you are using all 8 threads on your CPU aren't you?
    0_1525288393133_9dc46c6b-d2db-43e2-b9a3-1b1e63c80d7f-image.png

    Ah, I just checked and the i7 5500 is only a dual core, i.e. 4 thread processor so you should be running 4 threads not 8 (or 12 if you had a fancy Ryzen 6 core ;-P )



  • Ghostship, 9.5 hours may seem like alot, but remember, I don't have the fancy stuff that you have. I'm dealing with a dual-core processor and only one GPU.

    I am running 8 threads. What does "Separate Process" mean?



  • @glossaphile Yes, our CPU's are different. That is not what I'm testing here. I know that my CPU will be faster than your CPU. That first render was just a baseline for comparing to your settings. I've eliminated all other factors except render settings by rendering my tests with my models and shaders. Here is my second test. Same model, shame lights, shaders etc. Only thing that is different is that I'm now using YOUR render settings. We want to see what the quality is compared to my settings and also see how long it takes to render...

    Your settings produced slightly more noise and a longer render time 68 min as aposed to 47min with my settings. Take a look.
    0_1525295294142_CPU Time Test 2.jpg



  • @glossaphile Now I would also say that even though my CPU is faster, it would in no way be the reason your render took 9+ hours and mine took 68 min with your settings. Lets say that my CPU was 2x as fast as yours (a stretch) that would mean that my render time should have been more like 5 hours. the issue is your shader settup + a little bit of your render settings.

    I'll tweak your settings and see what I come up with but the reality is that the hair shader is killing your render and the benefits it provides is not equal to the render time penalty.



  • @ghostship I usually render with a three-point light setup, so maybe add a third light if you really want them to be comparable.

    In any case, I certainly appreciate you taking the time to help me figure this out.



  • @glossaphile the extra light would not make a difference, besides, that is not what I'm testing.

    Did a couple of quick spot tests to test bucket size. I turned my hair model off in the hierarchical editor and tested the whole render again this time seeing weather or not bucket size is and issue. With hair off I did not get a significant difference in render speed with buckets of 32 or buckets of 16. When I turned the hair back on and did spot renders of just hair there was a vary different outcome. Bucket size 16 hair spot render 130 seconds, bucket size 32 hair spot render 202 seconds. The render engine is choking on the 32 pixel bucket size on areas that the hair are in. I would suggest setting your bucket size to 16 to start and see if that speeds things up. It should.



  • @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.



  • 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