PDA

View Full Version : Flickering in renders with Shave+p_HairTK+MR in Maya2009


Jaylee81
01-04-2010, 05:28 PM
Hi all,

I've tried to read every thread and page I could find about working with hair and shave, rendering hair and pass rendering of hair, but now I'm running out off time and patience so if someone has any ideas/pointers/good render settings please write.

What I'm using at the moment is Shave and a Haircut+MR+p_HairTK, and hopefully p_MegaTK_passes if I manage to hook it up properly (pointers on this would be appreciated).

The thing is that I'm getting alot of flickering now and I'm not sure how to get rid of it, didn't have these problems before I switched to p_HairTK but then I didn't have nice looking hair either so cheers Puppet. :thumbsup:

All the links to example files seems to be dead to, so a link to a scene that I can take a look at would also be good.

And another thing, what's the best way to separate the shadows from the hair cast onto the character, in order to comp this? I'm guessing this is something that you can do with p_MegaTK_passes? So once again how does this work, and how do you set it up? Is there a dummy version :P

My setup at the moment:
Shave, MR, Hair primitives, rasterizer (rapid hair), no FG/GI or raytrace, detailed shadow maps, P_spotTK. These are settings based of what I've found.

The result is much better than what I started with, but it seems to be a general issue working with hair. Am I right, is it really this tricky or is it just because I'm new to this part of CG?

Thanks in advance, hopefully I can pay you back when you run into problems in the future.

Cheers!

Ash-Man
01-04-2010, 07:02 PM
there is a BUG with MR and Joe alter shave & hair cut
contact Autodesk for a patch

Jaylee81
01-05-2010, 07:09 AM
Oh that's good to know, do you know what kind of bug it is? Could be good to know what to expect when you're trouble shooting the scene. And what patch do you mean, is it corrected with service pack1a? Thanks.

Puppet|
01-05-2010, 12:28 PM
What you mean "flickering". May be it's just shadow flickering?
You may try to increase "Shadow Samples" (8-64) and "Detail Samples" (2-4).

Jaylee81
01-05-2010, 02:10 PM
What you mean "flickering". May be it's just shadow flickering?
You may try to increase "Shadow Samples" (8-64) and "Detail Samples" (2-4).


It could probably be flickering in the shadows, I will raise the samples and re-render as soon as I can. (And edit this if it helps)

[EDIT] Got rid of most of the flickering by raising the shadow samples to the numbers Puppet| wrote. Cheers [EDIT]

Jaylee81
01-06-2010, 04:55 PM
Now I'm up and running with Shave hair, p_HairTK and p_MegaTK_pass. Works great and I got rid of the flickering.

But my hair refuses to cast shadows upon the other geometry, thus not giving me a correct shadow pass from p_MegaTK_pass. What might I be doing wrong?

Shave Globals set to "Do hair shadows".
p_HairTK_Shadow set as Shadow Shader and p_HairTK1 set as Material Shader in p_HairTK1SG. All lights have p_SpotTK assigned as Light Shaders.
And detailed shadow maps as mentioned before.

I'm so close now achieving what I need, so all ideas on how to get the shadows working with render passes would be much appreciated.

Puppet|
01-06-2010, 05:02 PM
Do you mean shadow or shadow pass?
Please show me your image.

Jaylee81
01-06-2010, 05:57 PM
Do you mean shadow or shadow pass?
Please show me your image.

I mean both, can't get it to render shadows to begin with and therefore not in the passes either. The other pass results I'm getting from p_MegaTK_pass works great (depth etc), so hopefully the problem with the shadow can be solved. The beard doesn't cast any shadows onto the character, as you can see on his cheek. I tested to apply p_MegaTK to the character mesh but then Maya just crashes on render time, in batch to, so maybe I'm not supposed to do that? It's just a white lambert on the character right now.

The Motion pass in p_MegaTK_pass is that a motion vector pass? If so which format should I output it to and how do you use it in post?

Thanks Puppet.

http://img341.imageshack.us/img341/7962/beardnoshadows01.jpg

Puppet|
01-06-2010, 07:22 PM
Shadow should works. Possible you have much shadow blur.

And regarding crash...
Possible it's that I have already fixed in beta 12:
- p_MegaTK_pass: Fixed bug with resaving all frame images when incremental mi and p_OpenEXR_saver used
- p_OpenEXR_saver: Added meta data to file (like camera matrix, focal, aperture...)
- p_MegaTK and p_HairTK: Fixed crash with detail shadow in rare cases. Actually it's mental ray bug
- p_HairTK: Fixed rare crash bug with rasterizer and raytracing enabled. Actually it's mental ray bug, state->bary[0] return NaN value
- p_MegaTK_pass: Fixed possible crash if 'half' buffer type used with 'frame buffer gamma'. Now frame buffer is always 'float'. It's mental ray bug that was fixed in 3.8.1.20 (Autodesk branch) and 3.8.2.3
- p_math_output: Fixed possible 'inf' value
If you are using win64 you may try followed version for Maya2009win64 and Maya2010win64:
http://www.puppet.tfdv.com/download/shaders_p_3.3b12.zip

Jaylee81
01-07-2010, 08:37 AM
Shadow should works. Possible you have much shadow blur.

Yes it seems so, the Softness attribute in the Detailed shadow maps is extremely sensitive. I had a value of 0.01 and nothing was showing, lowered it to 0.001-0.005 and now I'm getting shadows. Still not great shadows but they're easier to tweak when you see them =). Are there any other attributes that are as sensitive as the Softness?

I have the Detail Shadow Map Accuracy set to 0, should i raise this?


And regarding crash...
Possible it's that I have already fixed in beta 12:

If you are using win64 you may try followed version for Maya2009win64 and Maya2010win64:
http://www.puppet.tfdv.com/download/shaders_p_3.3b12.zip

Unfortanately I'm on a 32Bit windows machine at work, which sucks so I won't be able to test the link. But my problem seems to be the blur, so the problem with the crash isn't bothering me at the moment.

But I'm not getting a output from the Motion pass, it's all grey images in Nuke. I set it to .tif in the p_MassTK_pass, should this work straight away or do I have to hook it up to some other thing, like p_motion_to_rgb?

Jaylee81
01-07-2010, 02:20 PM
Ok, so now I'm getting the shadows cast onto the character in the render. But now the flickering is back and worse then before, trying to tweak it now. Will the Bias in the Shadow Map Overrides and the Accuracy in the Detail Shadow Map Overrides help to prevent flickering? Any ideas on some good values?

The Fuzz and Resolution attributes in the Shave Shadows, do they have have any effect through the p_hair system?

Puppet|
01-07-2010, 02:32 PM
I suppose now you have classic shadow flickering :)
You may fix it with:
1. Increase "Detail Samples" 2-4 (sometimes possible more)
2. You may also increase shadowmap resolution.
3. Direct your spot light more accurate. Less empty area as possible.

Sorry, I don't know what are 'Fuzz' and 'Resolution' attributes in the Shave Shadows.
I suppose no. Just use mental ray shadow settings.

Accuracy should not effect to flickering.
Bias 0, mean that auto bias. You may set in manually if you want. Lower it as possible before self shadow artifacts will appear.

cavemen
01-08-2010, 09:13 AM
Well here are a few pointers that i can give you...
First of all use spotlights ( if you are using directional lights ... its really a bad idea)
keep the cone angle as tight as possible to your character.
if you are having flickering problems increase the resolution of your shadows.
toomuch of softness will kill you at rendertimes. a value between 0.003 to 0.004 is enough..
I really doubt if accuracy will really help you with flickering.
i never touch this value, keep it default...
Have you set detail shadows in the renderglobals ?
In shave settings instead of using buffer use hair primitives.. those are more stable and will give you a much accurate renders.

If you still have a problem do letme know..

It would be helpful if you could post your light shadow settings to us...


I have another issue with Shave and MR ( nothing to do with P_Hair_Tk)
since you brought it up...

Shave hair renders flat at times...
In that case I tried a lot of things and finally a non logical solution seems to work... ie to delete the render layer and recreate it ...
and for no logical reason after the new layer creation the hair calculates the shadow correctly.
Its really weird..!

Jaylee81
01-08-2010, 12:35 PM
Thanks guys for the ideas, I got rid of most of the flickering by raising Resolution, Samples, and fine tuning Softness (the last is crazy sensitive =) )

Cavemen: Yes to all your questions, all good things to know, which I've found out by reading various threads and pages. Thx anyhow. The world of Shave (or hair rendering in general)... Don't get me started.. :P Would be fun to see how the TD's work with this in a big production, any links or behind the scene materials you've seen about it? Just for fun.

Now I'm bothered with the output passes from p_MegaTK_pass, don't know which ones that works and looks like they should.
And I'm not sure how to best output the shadow cast from the beard onto the character separately, would it be best to use a Use Background shader or do have any other ideas?

Take a look and let me know what you think.
http://img204.imageshack.us/img204/7369/pmegatkpassoutput712.jpg

Is the RGBA pass in p_MegaTK_pass an equal to beauty? Doesn't look like it but I thought I should ask.

cavemen
01-08-2010, 12:43 PM
well just because you got it up...
I just finished working on a movie with a whole bunch of fur characters in it.. (cant disclose as of now)
hummm of my experience I can say... You kinda get used to it :) ...
Once you know your settings its quite rare that you will get these problems..

Jaylee81
01-08-2010, 01:39 PM
well just because you got it up...
I just finished working on a movie with a whole bunch of fur characters in it.. (cant disclose as of now)
hummm of my experience I can say... You kinda get used to it :) ...
Once you know your settings its quite rare that you will get these problems..

A whole bunch of them sounds like a nightmare for me at the moment =), but I guess that depends on the experience, technical skills in the team (good TD's), and software and equipment.
What software and techniques do they use in these productions? Shave, MR/Renderers, Maya2009 passes?!? Shaders? Or is it just inhouse tools developed at the companies?

zerogee
01-08-2010, 06:17 PM
And I'm not sure how to best output the shadow cast from the beard onto the character separately, would it be best to use a Use Background shader or do have any other ideas



Let`s suppose we need two layers (with several passes) a body renderLayer (which contains the body /without the fur/ and everything including the shadow of the fur) and a fur renderLayer which contains nothing but the fur.

RL = renderLayer

okay, the furRL is simple: We use a black surface shader with an out matte opacity = 0. This is actually a R = G = B = A = 0 color. This blackMatter has to be assigned to the body (and everything which is not fur). The p_HairTK has a shading group and a p_HairTK_shadow shader can be plugged into to the shadow port. If you enable the use transparency and increase the color of the transparency a bit you will get transparent shadows. Pretty straightforward huh?
render globals: Use a rasterizer override (primary renderer) with a low (0.250) shading quality (at the rasterizer quality).

bodyRL: I just wanna give a trick to get similar result with shaveNode as it would have a primary visibility attribute as a normal mesh has. Find the transform node of the actual shaveDisplayGroup of the shaveHair and under mentalray/Flags there is a Derive from maya checkbox. Override it, uncheck, then override visible, select No and voila....
Of course this is a beauty pass but if you use megaTK for the body then you`ll have the diffuse and specular shadows in a separate pass. (nota bene: use spotTK lightshader)


If anything is not clear search for the "shave" word in this site. You`ll find a few threads about "megaTK" and "shave and a haircut" which has a few more extra info about render globals/shadow/passes/shader settings plus a few possible and confirmed bugs which can save a lot of time if you know how to avoid them.

hope this helps.

Jaylee81
01-10-2010, 09:53 PM
Big thanks zerogee, will try this out at work tomorrow. And search for the threads you mentioned.

Thanks again!

MaxUzkikh
04-04-2010, 06:59 PM
Let`s suppose we need two layers (with several passes) a body renderLayer (which contains the body /without the fur/ and everything including the shadow of the fur) and a fur renderLayer which contains nothing but the fur.

RL = renderLayer

okay, the furRL is simple: We use a black surface shader with an out matte opacity = 0. This is actually a R = G = B = A = 0 color. This blackMatter has to be assigned to the body (and everything which is not fur). The p_HairTK has a shading group and a p_HairTK_shadow shader can be plugged into to the shadow port. If you enable the use transparency and increase the color of the transparency a bit you will get transparent shadows. Pretty straightforward huh?
render globals: Use a rasterizer override (primary renderer) with a low (0.250) shading quality (at the rasterizer quality).

bodyRL: I just wanna give a trick to get similar result with shaveNode as it would have a primary visibility attribute as a normal mesh has. Find the transform node of the actual shaveDisplayGroup of the shaveHair and under mentalray/Flags there is a Derive from maya checkbox. Override it, uncheck, then override visible, select No and voila....
Of course this is a beauty pass but if you use megaTK for the body then you`ll have the diffuse and specular shadows in a separate pass. (nota bene: use spotTK lightshader)


If anything is not clear search for the "shave" word in this site. You`ll find a few threads about "megaTK" and "shave and a haircut" which has a few more extra info about render globals/shadow/passes/shader settings plus a few possible and confirmed bugs which can save a lot of time if you know how to avoid them.

hope this helps.

Hi! zerogee!

I'm trying to get shadow on a head from hair. When I turn off primary visibility in shaveDisplayGroup, but nothing change! :banghead:
How it fix it?

Thanks!

zerogee
04-06-2010, 12:33 PM
bodyRL: I just wanna give a trick to get similar result with shaveNode as it would have a primary visibility attribute as a normal mesh has. Find the transform node of the actual shaveDisplayGroup of the shaveHair and under mentalray/Flags there is a Derive from maya checkbox. Override it, uncheck, then override visible, select No and voila....
Of course this is a beauty pass but if you use megaTK for the body then you`ll have the diffuse and specular shadows in a separate pass. (nota bene: use spotTK lightshader)

Omarios
09-26-2010, 08:26 AM
this is a very informative thread
thanks everyone

zhbj420
01-23-2011, 02:53 PM
this post is just a life saver.Thank you

CGTalk Moderation
01-23-2011, 02:53 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.