MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

extracting shadow from objects that have hair

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Steve Bentley
extracting shadow from objects that have hair
on Oct 28, 2019 at 8:26:30 pm

I've tried all the tricks I know. I need to get the shadow that falls on the head from the hair as a separate element.
I've got a shadow catcher on the head (used correctly unlike the users manual). I do get the shadow but I also get the hair. I've tried compositing tags on the hair, also turning off the post processes in the render (hair is a post process right?), also tried a multi channel render.
The closest I've gotten is coloring the head with greenscreen green, using a shadow catcher and then I only get green where the shadow is and I can key the shadow. But I'd rather have a head only that shows in the alpha but only where the shadows fall.
Is this a no go due to hair being a post process?



Return to posts index

Brian Jones
Re: extracting shadow from objects that have hair
on Oct 28, 2019 at 11:31:57 pm

I haven't ever tried to separate the hair's shadow out but I'd have to agree with your guess re. not possible due to the post-process nature of it, perhaps unless it was poly hair? But then I assume you'd need a double render - one for the shadow, one for the proper look.


Return to posts index

Sam Treadway
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 1:15:03 am
Last Edited By Sam Treadway on Oct 29, 2019 at 1:18:08 am

I've starting using the takes system a lot for things like this rather than passes and post-processes.
Just create a new take and then with the main take selected, drag all the material tags for the hair, and with a new take active replace the referenced materials in each tag with a new material that is solid white in luminance and all other channels turned off. This gives you a sort of inverted matte. Make sense?


Return to posts index


Steve Bentley
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 1:19:30 am
Last Edited By Steve Bentley on Oct 29, 2019 at 1:22:22 am

Thanks Sam I'll give that whirl.
While I'm on the subject, I'm having a devil of a time with what I assume is faults in the hair caches. I'm not using dynamics (its turned off in the hair tags) but as I'm getting closer to refining the hair, it will fail and I'll have hairs shooting places where guides are not (both in viewport and in a render). I know its caches because if I save, quit, restart (and yes restart is required) its back to where it should be. Is there a way to flush these hair caches while in the app? This restart thing is just wasting soo much time.
R19 win7



Return to posts index

Sam Treadway
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 1:49:27 am

I'd have to see your scene or at least a screen recording to know what you are talking about. There are two caches for hair - dynamics and editor.
If you click on the editor tab in the hair object's parameters, is the cache enabled? If yes, then you may be running low on system memory. If you have it set to display the hairs instead of just spline guides then try reducing the detail level below 10% (maybe even 5%) and see if that helps.


Return to posts index

Steve Bentley
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 2:25:04 am
Last Edited By Steve Bentley on Oct 29, 2019 at 2:27:58 am

Ya I'm only displaying 1 percent (and that's 1 percent of 10,000 hairs, 60 segments) so its not a crazy amount of hairs. To be fair i've got 6 hair objects going (with the same or lesser amounts) but still, on a 128gb system, if it can't handle that then that's lousy coding .
I've tried cache in the editor on and off (I wish there was a flush button like there is for other features in C4D). It just seems to go bad after a while of working with it and massaging the settings.
I can work with just guides on (only about 6 guides per hair object) but then I never know when the hair fails as the guides are always solid. If I go too far after the failure, that failure sticks and then corrupts the hair object in question forever and grays out the hair count in the attributes. I often don't catch the failure right away and continue working, but caught in time, a save, quit and restart will make the file as right as rain.
Hair is tedious enough to get right without this restart delay vexing me every 20 min or so.
Oddly, if I render the failed hair object, it renders just the guides.



Return to posts index


Sam Treadway
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 2:46:19 am

I honestly haven't done enough grooming to come across this issue....sounds like a real PITA!
Out of curiosity: what will happen if you click on Store, Regrow, Restore in the 'editing' section of the Guides tab?

...definitely not expected behavior and you shouldn't have to keep restarting to get stuff to work.
I'd submit a bug report to MAXON along with a screen capture.


Return to posts index

Sam Treadway
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 3:04:27 am

...just realized you're on R19.
Maybe this has already been fixed? I'm using R21. Sorry I can't be of more help.


Return to posts index

Steve Bentley
Re: extracting shadow from objects that have hair
on Oct 29, 2019 at 4:41:03 am

Once I'm done I'll fire it into R21 and see. This is an ongoing project that we update a few times a year and the changes to R20 broke it so we had to stay in 19 for this one.

Since turning the cache off and deleting the latest bad hair object its been behaving. So I'll get the renders on and then check the reset you suggest. Historically when we do that we lose the grooming and we get the guides going back to their "straight out from normal" positions, and that's not undoable even when you have the "undo dynamics" turned on in the prefs. So I'm always leery.

While I'm always amazed at what the hair system can do (and appalled at the examples provided my Maxon, given what could have been generated) , I'm equally appalled at the flakeyness of the hair system, it doesn't take much for it to break.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]