If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
New! You can now log in to the forums with your chaos.com account as well as your forum account.
Well you could make stray hairs (say 5%) within a description like explained in this tutorial - https://www.youtube.com/watch?v=4Q_fNjyTGmY
But all the hairs will share the same material - the one of the description.
What you could do is make 2 descriptions on the same geometry and make the stray hairs only in one of the 2 descriptions and assign it a different hair shader.
But then you loose the flexibility of having stray hairs. You would need to change your description on 2 places everytime you change stuff.
Having the ability to for example output stray hairs as white and normal hairs as black through the HairSampler would be awesome. Then you can get the shading variation you want for the stray hairs, but keep it in 1 hair shader (or output it as a mask for a blend between 2 hair shaders).
But that info might not be accessible through xgen for other renderers?
Im thinking of something like a stray_color shader parameter could be added that then gets picked up by the hairsampler.
I sort of did what you wanted - I assigned a switch mtl to the description and on slots 0/1 - 2 different materials.
Then on the switch parameter of the switch mtl I assigned VRayHairSampler.
Then I added the "root_color" custom shader parameter as color and gave it the following expression: "[stray(), stray(), stray()]" which essentially outputs white and black colors based on what stray() returns (which can be configured as a percentage from XGen/Descriptions/Set Stray Percentage...)
This is the best I could think of - here is a pic of the result with 10% set as stray (and more xgen noise for them)
This way though you will not be able to color each hair individually with root_color/tip_color with a hair sampler because it will be already used to distinguish stray/non-stray hairs...
FSGFX - As far as hair/face id's are concerned - I have no ideas.
This way though you will not be able to color each hair individually with root_color/tip_color with a hair sampler because it will be already used to distinguish stray/non-stray hairs...
FSGFX - As far as hair/face id's are concerned - I have no ideas.
thanks... but thats no solution here...
i would need to use root - tip color + stray mutant
Oh wow - I am a bit embarrassed
Indeed there is no need for silly switch materials with hair sampler and wasting the root/tip colors like I did...
All you need to do is to pass an expression to the root/tip colors like this:
stray() ? [1,0,0] : [0,1,0]
And this will give red to strays and green to non-strays. You could also read from maps instead of hardcoding colors like this - but this is in the SeExpr language realm which is used for all xgen expressions
could we have an custom attribute for the hair shader to read in the stray data via the hairsampler node.?
this would be much easier to have some sliders in the hair shader to color the stray hair...
turn on stray in xgen
create attribute on vray hair shader
is there any way to read in custom attributes with the vrayhairsampler node...
not just the hardcoded root_color and tip_color..?
i want use those two and feed them into a ramp node....
at the moment the sampler node will read in both at the same time...
but i would need one for root_color and an other one for tip_color...
Comment