Jump to content

Question about Mario's SSS Shader


Recommended Posts

Hello guys,

I was wondering if I could get some help in regards to the Axyz SSS shader.

I want to mix another VOP with this shader. Say for example I want to use the StoneVOP as the surface material of my object and then use the SSS shader for the scattering effect. I can't figure out how to mix these two in the hip example provided with this shader.

I did go into the VOP network and just use a colorMix VOP between the Stone and the SSS _Mulit VOP but in the example hip provided, an add VOP is plugged into the output Node so I don't really know where to plug this colorMix node to?

I hope I didn't confuse the subject too much. Long story short I need to apply a pattern to my object and get sub-surface scattering effects on that. I'd appreciate your assistance with this regard as I don't have much knowledge with VOPs.

I noticed that this shader has some header files in the include folder. I plan to do some farm rendering with this shader via ifd files. Is there a specific place that I need to put the include folder so that all the slaves can see it? I noticed the scene renders black if the include file can not be found relative to the hip file.

Thanks for your feedback,

Rick

Link to comment
Share on other sites

Hi Rick,

I want to mix another VOP with this shader. Say for example I want to use the StoneVOP as the surface material of my object and then use the SSS shader for the scattering effect. I can't figure out how to mix these two in the hip example provided with this shader.

15895[/snapback]

The stoneVOP (and other "material" VOPs) have illumination included in them. If you go into the subnet you'll notice there is a lightingVOP in there. The SSS VOP calculates reflectance as well so you can think of it as a funky version of the lighting VOP.

So; given the above, you'll want to suppress the lighting calculation built into the stone VOP and replace it with SSS. To do this you can just output the surface color information (from the stone subnet) and either wire it to the "Rd" input of the SSS VOP, or take the output of SSS (solved on some neutral white color) and multiply it by the surface-color-only (the "mix_colors" VOP) calculated by the stone material.

In general: the SSS VOPs work in much the same way as the lighting VOP in that they calculate reflected irradiance (aka: "reflectance"). And as is the case with the lighting VOP, you can choose to either feed some surface color ("diffuse" color in the lighting VOP) to the SSS VOP itself, or multiply white reflectance by some surface color -- in both cases you're weighing reflectance by surface color (aka: "albedo"). There is actually a subtle difference in the case of the SSS VOPs if they are set to "Evaluate RGB Separately", so that feeding surface color to the "Rd" input would give you a more "correct" result than just multiplying after the fact.

So now, instead of a single lighting VOP, you have a couple of SSS VOPs that you can think of as "diffuse only". If you want specular and env reflections you'd define them separately add them all together for final reflectance. Thet's what the AddVOP is doing in the example SSS hipfile: it adds together the output from both single and multiple scattering, and the output of the specular calculation (given by a lighting VOP which is set to only calculate specular).

Did I just complicate the heck out of it, or does that make some kind of sense?

I noticed that this shader has some header files in the include folder. I plan to do some farm rendering with this shader via ifd files. Is there a specific place that I need to put the include folder so that all the slaves can see it? I noticed the scene renders black if the include file can not be found relative to the hip file.

15895[/snapback]

The header files are included (separately in their own directory) in the bundle for anyone who might need to use them to build their own sss-related VOPs/Shaders. They are not needed by the posted SSS VOPs (they have these files embedded in them already). So you can just ignore them completely :)

Hope that help,

Cheers!

Link to comment
Share on other sites

Hello Mario,

Thanks for the reply and explanation. It kinda makes sense. I'm going to try out your suggestions as soon as my render gets done.

I think what confused me in that sample hip file was that the SSS_Mulit and SSS_Single was not wired into anything, they appear to just be hanging out there.

cheers!

Rick

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...