Forums
You are not logged in.
#1 2009-09-30 10:33:21
- nataimages
- New member
- Registered: 2009-09-28
- Posts: 4
Shave and 3delight -> Quick Setup HELP
Hi Everyone,
We are 3d students working on a short animation for honours. We have 4 characters that are pretty much covered with fur. After countless attempts to render shave with mr hair primitives I gave up and now trying to use 3delight. So far so good.
Character's look:
http://nataimages.com/uploads/CharacterFurLooks.jpg
However I really need help from you. The hair counts go up to 300 000 with multi-strand around 4, 2 hair passes and around 2 hair systems on each character. Renders can't be more then 7-8 min per frame.
1) I'm running some test and I can't get rid off anti-aliasing. I tried to increase the shading rate and pixel samples. It helps but it still flickers. Can anyone give some tips on how to get shave hair to look nice?
2) Does anyone can explain how to render separate hair passes with shave? I need to comp hair separately from the characters.
3) Is there a good shader besides shave and a haircut that can be assigned to a fur styled with shave? I would be really interested in using one as we are quite desperate to render it out to the deadline.
I'm new to 3delight and not very good with scripting as I'm specializing in compositing mainly but fur is essential to this piece.
Any advice would be greatly appreciated.
Natalia and John
P.S This the the first animation we did in school:
http://www.youtube.com/watch?v=cJv37kWjJqc
Last edited by nataimages (2009-09-30 20:14:20)
Offline
#2 2009-09-30 11:59:09
- nataimages
- New member
- Registered: 2009-09-28
- Posts: 4
Re: Shave and 3delight -> Quick Setup HELP
I ran more test on one of the characters. Maya keeps crashing even with the hair count as low as 1000 hairs.
Any ideas?
Offline
#3 2009-09-30 12:07:46
Re: Shave and 3delight -> Quick Setup HELP
Code:
surface a_hair_shader ( float Kd = .8, Ks = .15, roughness = .015;
color root = 1;
color tip = 1;
color specularcolor = 1;
string colorMap="";
float Arot = 1, Atip = 0;
float blend = 0.5, sdist = 0.7;
float theta = 0.15;
float TRANSLUCENCE = 0;
float transl_Focus = 0.1, i_translucence = 1;
color idcolor = 1;
uniform normal skin_normal=1;
uniform color rootcolor=1;
uniform color tipcolor=1;
output varying color aov_diffuse_intensity = 0;
output varying color aov_surface_color = 0;
output varying color aov_specular = 0;
output varying color aov_occlusion = 0;
output varying color aov_id = 0;
output varying color aov_translucence = 0;
output varying color aov_diffuse = 0;
)
{
normal Nf = faceforward(normalize(skin_normal),I);
vector Tu = normalize(dPdu);
vector Tv = normalize(dPdv);
vector T = .5*(Tv+Tu+(Tv-Tu)*cos(2*PI/180*theta));
vector V = -normalize(I);
color Cspec = 0, Cdiff =0;
float cosang;
illuminance (P) {
cosang = cos (abs (acos (T.normalize(L)) - acos (-T.V)));
Cdiff += Cl*diffuse(Nf);
Cspec += Cl * pow (cosang, 1/roughness);
}
float opacColor = mix(Arot, Atip, smoothstep(sdist-blend, sdist+blend, t));
/*TRANSLUCENCE*/
float focus = min( transl_Focus, 0.99999 );
color Ctranslucence = 0;
if( TRANSLUCENCE == 1)
{
illuminance( P )
{
float nondiffuse = 0;
lightsource( "__nondiffuse", nondiffuse );
if( nondiffuse == 0 )
{
float costheta = normalize(L).normalize(I);
float a = (1 + costheta) * 0.5;
float trs = pow( pow(a, focus), 1/(1-focus) );
Ctranslucence = Cl * trs * i_translucence * (mix ( rootcolor*root, tipcolor*tip, v));
}
}
}
Oi = Os*opacColor;
aov_diffuse_intensity = Oi * Kd * Cdiff;
aov_surface_color = Oi * (mix ( rootcolor*root, tipcolor*tip, v));
aov_specular = Oi * Cspec * specularcolor * Ks;
aov_id = Oi * idcolor;
aov_translucence = Oi * Cs * Ctranslucence;
aov_diffuse = aov_surface_color * aov_diffuse_intensity*Oi;
Ci = aov_surface_color * aov_diffuse_intensity + aov_specular + aov_translucence;
}..try this shader with skin_normal, some aov_pass (like the default of 3dfm) and aov_id for create a mask of hairs.
Atip, Arot controls the opacity.
I suggest that: don't use hair passes, and if you don't have curl hair, just to use 3 or 4 segment.
a.
Offline
#4 2009-09-30 12:50:01
Re: Shave and 3delight -> Quick Setup HELP
The first thing to make sure of, to avoid aliasing, is that the width of a hair should not be much less than a pixel.
This means the number of hairs on a character is a function of the size of this character on screen and varies with distance from the camera (assuming a perspective projection is used).
This is called level of detail (LOD). Any furry character you saw in any blockbuster in recent years uses this. Otherwise you would need an insane number of pixel samples, on characters with dense fur.
I don't know Shave very well. If it doesn't support LOD, you can do per shot LOD yourself., manually.
An easy rule of thumb is to half the number of hairs and double the width. Quarter the number and quadruple the width, etc. In math lingo: multiply the width by the factor you divide the number of hairs by. Note that this factor doesn't need to be an integer!
In a fur system with continous LOD, hairs are faded out as the width of the remaining hairs is increased proportionally.
As far as shading rate & pixel samples go: shading rate is the shading quality. It does not help with antialiasing of geometric primitives. For fur that doesn't have much median detail, a good shading rate to start with is 20 (yes, twenty), Set this shading rate only on the fur, of course. Keep the global shading rate at around 1 for everything else (for a beauty render).
One thing beginners often miss is that shading rate is a local quality knob (per object/gprim). Pixe samples is a global one (per image, unfortunately).
Start with 10 pixel samples. 20-30 pixel samples are not rare with dense fur. Pixel samples are cheap, low shading rates are not!
But before tweaking those settings, definitely make sure your fur strands are not much smaller than a pixel in width.
Lasty, if you have a lot of lateral detail on the hair strands (along the width), 3Delight has an undocumented feature where you can force a lateral dicing on curves that is independent of shading rate.
This is an attribute called "dice:hair". Set this to the numbers >1 to force the resp. number of shading samples on the affected curves in the lateral direction.
This will only make sense when you use a complex shading model like Marschner et al. For Kaija & Kay (the shader baobao posted) or something equally simple, "dice:hair" should be 1.
In any case, the shading time spent on the fur is proportional to "dice:hair", when this is >0. Watch your render times for values >1 thus.
Hope some of this helps.
--Moritz
Last edited by Mauritius (2009-10-02 05:39:00)
Render faster, get to the party earlier — /*jupiter jazz*/
Offline
#6 2009-10-01 09:24:31
- Asyl
- Member
- Registered: 2009-02-11
- Posts: 44
Re: Shave and 3delight -> Quick Setup HELP
Hi,
another thing to consider are deep shadow samples. I run all the fur jobs with a minimum of 9 samples to avoid flickering in shadows.
Andreas
Offline
#7 2009-10-01 09:35:57
- olivier
- 3Delight Developer
- Registered: 2007-01-09
- Posts: 1930
Re: Shave and 3delight -> Quick Setup HELP
nataimages wrote:
P.S This the the first animation we did in school:
http://www.youtube.com/watch?v=cJv37kWjJqc
Awesome :D I think Moritz covered much of what you need to know and then some. To sum it up: don't hesitate to crank pixel samples way up but don't use a fine shading rate. And don't use hair that's ridiculously fine. Using wider but semi-transparent strands might be something else worth trying.
Offline
#8 2009-10-01 11:03:48
- nataimages
- New member
- Registered: 2009-09-28
- Posts: 4
Re: Shave and 3delight -> Quick Setup HELP
Thank you so much for all your detailed answers. I'm working on styles at the moment.
Olivier, what do you mean by fine shading rate? And how do you set semi-transparency on fur? I am kind of running into the issue of having fine fur on the head of animals around the cut map, otherwise the wider width of the root it's too noticeable.
Mauritius - THANK YOU! IT'S GREAT!
Asyl - great advice!
baopao - thank you for shader. I will try to use it today!
It's the best forum I've ever visited.
Offline
#9 2009-10-01 11:50:15
- olivier
- 3Delight Developer
- Registered: 2007-01-09
- Posts: 1930
Re: Shave and 3delight -> Quick Setup HELP
fine shading rate == small shading rate value (eg 0.1). So try to keep it large (1, 5 or even 20 as moritz said) for fur unless you really can't.
As for transparency, it depends on the shader you use. baopao's has Atip and Arot parameters. Others might have other controls or hook into the opacity provided by shave (I'm not too familiar with shave itself).
Offline
#10 2009-10-01 13:01:11
Re: Shave and 3delight -> Quick Setup HELP
nataimages wrote:
I ran more test on one of the characters. Maya keeps crashing even with the hair count as low as 1000 hairs.
Any ideas?
It can be many things :) There are some problems with the Shave API provided by the Shave and a Haircut package that we use. Using high number of segments can do that. Some cases of cut maps can also cause troubles.
Maybe you are already aware of this, but just in case: the following options have a direct effect on the amount of data required to represent the shave hair shape and thus should be kept as low as possible to minimize memory usage and render time:
- hair count
- hair segments (which is often set too pointlessly high)
- multi-strand count
Offline
#11 2009-10-01 13:19:24
Re: Shave and 3delight -> Quick Setup HELP
nataimages wrote:
2) Does anyone can explain how to render separate hair passes with shave? I need to comp hair separately from the characters.
There are may ways to do this. Here is one: create an object set that includes every shape hair shape. You can then create two displays in your render pass. The first one will have its "Display Subset" attributes set to "Objects in selected sets" and set up to use the shave hair shapes object set; this will output an image with only the fur. The second display would have its "Display Subset" attributes set to "Objects not in selected sets" and set up to use the shave hair shapes object set; this will output an image with all renderable objects except the shave hairs.
If you are using 8.5.0, you can set this up in the "Secondary Displays" section. The Primary display would render all renderable geometry (i.e. characters and fur together) so maybe you'll want to turn off "Render Primary Display" and turn on "Render Secondary Displays".
Offline
#12 2009-10-02 01:24:44
Re: Shave and 3delight -> Quick Setup HELP
….anyway, you can also attach to shave geometry the standard
maya Anisotropic shader and connect color input with
a RendermanCode node with this code:
in Shading Parameters:
Code:
output color o_color output normal skin_N shader_input uniform color rootcolor shader_input uniform color tipcolor shader_input uniform normal skin_normal shader_output varying color aov_hair_msk
in Shading Code:
Code:
extern float v; o_color = mix(rootcolor, tipcolor, v); aov_hair_msk=1; skin_N = skin_normal;
this one pass the color values of shave to the color of Anisotropic,
and you can use all other parameters in a "standard" mode (….aov too), ….for opacity you can use a ramp if you like, example for have a transparency in the tip and in the root also.
Anisotropic use curves normal, if you want "skin_normal" (good for short fur) just connect skin_N to normalCamera of Anisotropic shader(…or phong, blinn etc.).
Add a secondary display and in the "user specified" write : color aov_hair_msk
you will have a mask of the hair, in the Advanced check "on" the Compute Alpha for this pass for have a opacity alpha.
RendermanCode is very powerful node of 3dfm and very simple to use for create custom shader, output aov_pass ect, try this and let me know if works.
a.
Last edited by baopao (2009-10-02 01:54:41)
Offline
#13 2010-11-18 01:13:21
- tompainter
- Member
- From: UK
- Registered: 2010-06-22
- Posts: 97
- Website
Re: Shave and 3delight -> Quick Setup HELP
Id like to say thanks to everyone who contributed to this post, great tips they really helped me get an idea of optimal settings for fur
Offline
#14 2012-01-09 10:48:42
- viper_0711
- New member
- Registered: 2011-12-11
- Posts: 2
Re: Shave and 3delight -> Quick Setup HELP
hi
im trying this with maya hair (PFX)
i got a flat color render
which i suspect i can't directly assign anisotrphic shader to PFX.
any way to do this method on maya hair?
thanks a lot
Offline

