Cycles Strand Rendering

Holy mother of mercy, this looks awesome, BroadStu, if You were a girl I’d kiss You!

This looks much better then BI in my opinion, as was mentioned by others. Can’t wait to show it to the team!

1000 samples

http://i1280.photobucket.com/albums/a493/PA3D/indiegogo_stuff/sam_cycles.png

ACK! i’m SO. HAPPY. to see this thread. i’ve been thinking all morning about how i was going to composite hair into a Cycles shot i’m working on, or just render with Lux or something else, and then i stumble on this thread.

the results look fanTASTIC so far, thanks Broadstu!

1 Like

@BroadStu - Increasing the value for exclude encasing helps,the circles almost disappear(still visible but much less),but I need to use huge numbers for this(setting it at 1.1 it doesn’t help much,I need to put at 4/6 to have some visible result),and of course the selfshadowing in the hair starts also to disappear when using high values,so probably it’s better to optimize the camera clipping distance for now.
Anyway,the patch is really good,hair are really fast,and use not much memory.

yes it works good on cuda i have GT610M

//edit sory GT610M not 620M :smiley: but it is no diff…

excellent that’s even the newest kernel so all should be ok.

Slight bug with the gtx580… if there is no strands in the scene it doesnt render, if there are, it does. enabling / disabling the cycles strand rendering doesnt change it.

Another slight bug, when you change the strand width with the interactive render display, it doesnt update… i had to exit out of the render preview and go back in to see the changes.

will 580 render the default cube scene?

Another test with yet another bald guy that was waiting for hair in cycles :wink:

https://dl.dropbox.com/u/8641310/bobo_hair_cycles.jpg

If at such an early stage is working so good I can’t imagine how it would be when is finished!!

No, but when i add hair to it, it does.

As far as I knew Luxrender only supports parent strands. So it isn’t much help when trying to control and render large amounts of hair, which for me, is every situation involving hair. Did Luxrender add support for child strand rendering? Otherwise this cycles patch is a HUGE advantage over luxrender. For me at least.

If development goes smoothly, what kind of time-line does this patch have to join the official Blender release so that people new to the idea of patching their own blender can use it?

Great work btw.

lovely! do you mind posting your nodes? i’m really curious how the strand node works so far. is there documentation of any kind at all yet? even in this thread? i didn’t see any, but may have missed a useful post…

ah,. they may not have. i thought it was back in 2.49 days, but haven’t been able to get many scenes to actually export hair at all in 2.6x, it often crashes the export. so i’m even GLADDER that this patch has been posted :smiley:

btw i’ve made a build for Linux if anyone wants me to post it. the only thing that it doesn’t have enabled is OSL, since i got errors with it after patching.

julperado, where did you get that picure of me?
:confused:

@Ace Dragon - That’s what I thought. But it seems to happen once I finish heavy use of the patch. Perhaps it’s due to a hardware failure. I will run some virus/malware checkers.

@marcoG_ita - The bug with emissive materials can probably be stopped by unchecking `sample as light’. Currently, it doesn’t set the shader for this and looks for a shader that don’t exist. This problem has been fixed. There are still other issues using this mode with the intercept output though. In terms of mode descriptions:

Accurate - calculates the exact intersection between the ray and strand for every strand the bvh gives. It also checks the backface of the strand. This is slightly slower. It also has precision issues.

True normal - uses the mid-point between the two intersection point (if they exist) to judge the distance. This is slightly quicker but may give slight defects with thick strands. It also ignores the back-face and uses the exclude encasing option to avoid precision problems.

Tangent Normal - This only ever uses the mid-point of intersections. This is similar to considering a slice through the strand and is the quickest. It doesn’t consider the backface and has to exclude encasing. The normals in this case are the tangent normal.

Tangent normals are normals calculated using the strand direction and incoming ray. It ignores curvature around the strand. It’s as though the strand is actually a plane that can tilt around it’s direction and always faces the incoming ray. Using this causes the result to converge much quicker than by using the cylinder normal but it isn’t accurate and makes the strands look thicker.

@doublebishop - Interesting problem with the 580. Does it render if you have hairs in the scene but deactivate cycles strand rendering? I would be interested if this also occur with other gpus? The updating isn’t great currently and I need to get around to improving it.

that’s definitely a bad bug…
but i’m sure can be fixed…
not sure if BroadStu should get the bug report or reported to Blender/Brecht(or Campbell)…

if a new patch is posted PM me.

I was actually looking into child hairs in Lux yesterday, and ended up here: http://projects.blender.org/tracker/?func=detail&atid=498&aid=33287&group_id=9

Looking at this patch, it’s using some C/C++ compiled into Blender to get the children? I hope Brecht adds some general API function that gets the render-count child hairs. Of course, since Lux lacks a proper hair primitive, I’m not sure how fast it would be anyway. (unless one of the Lux core guys manages to port over this, yay open source!)

Btw, it seems the issue with particles crashing in Lux was fixed in 2.65. Not sure what it was, but the crash seems to be gone.


Also, is there an OS X build of this around that I missed?

@turquoiserabbit - There’s no set timeline for including it yet, if at all. I will see what the developers think. The code it currently quite messy. So, in my opinion it will be at least a few months until it’s of a suitable quality.

Here are a few other examples I rendered previously. They also illustrate some differences between using accurate normals and tangent normals. The images on the right use tangent normals.
http://www.pasteall.org/pic/show.php?id=41580Here are some demonstration videos I made. They use progressively newer versions.

@ohsnapitsjoel: here’s the node setup I used for the furry character, as I said it allows the hair to be transparent in the tip, but it increases the render times A LOT!!
https://dl.dropbox.com/u/8641310/hair_node_setup.jpg

So instead you should lower the Width Multiplier to something like 0.02 and render more children particles to avoid that.

@holyenigma74: hehehehe :smiley:

EDIT:
Here’s another one, took an old scene and set all the materials for cycles to do the comparison, and it is much better and much easier to setup in cycles than in BI.
https://dl.dropbox.com/u/8641310/bi_cycles_comparison.jpg

https://dl.dropbox.com/u/8641310/guy_cycles_hair_2.jpg

This is only with gpu rendering. cpu rendering is fine

Both when i have ‘enable cycles strands’ enabled and disabled… it crashes whilst there is no hair in the scene… it has ‘CUDA error: Invalid value in cuMemAlloc(&device_pointer, size)’ . As soon as i add hair into the scene… it works fine.

Anyway, great progress mate!

hmmm… as it was compiling the CUDA kernels i remember it saying something about that…
and it said couldn’t find memory or pointer (or something like that) “using local space”
if that means anything you guys.


would like for someone else to compile this on VC with CUDA to see if it has the same “bug”