i've been 3d modeling for a while now and there are a few things (some new some old) that i still have yet to fully understand when dealing with photorealistic models.
(bear with me i believe these questions largely deal with shaders, but since i know very little about shaders [beyond that you should use them] you can never be too sure)
1. An effect i've seen recently in a couple of tech demos and a few very snazzy renders that i've seen on the boards. Reffering to a back lighting and transperacy effect with skin. An example would be the nose and ears, when lit from behind (or certain angles) a red sort of transparent glow can be seen, not making them transparent, but enhancing that realistic affect.
2. Different hues for shadows on skin. Example: instead of going to skin color to darker skin color (via adding more black) it mixes in red and yellow values, looks nice and realistic.
3. Also what maps are essential when making a photorealistic model (preferably models that would appear in a next-gen game...or next-gen portfolio perhaps)
i had meant to add more of these when i started but, i guess those neurons mis-fired while writing ...hopefully i'll think of them later.
-thanks in advance
Replies
and both realtime and rendering (i'm interested in both)
Try: http://www.highend3d.com/maya/downloads/shaders/
There's a ton of shaders there. I don't know If you're using software or mental ray. I've tried a few SSS shaders. Some are a lot better than others. There's one there on the first page for mental ray that seems to be rated highly. I cant remember off the top of my head which ones I've tried. Render times are generally a biatch. But there are other shaders that are not true SSS but attempt to fake it.
As for realtime, that might be tricky without an engine platform. Because mayas realtime viewport display is hardly the most sophisticated thing in the world.
As for your earlier question about maps, again, it sorta depends on the final rendering situation, but at the least you'll usually need colour, specular colour, bump. But there are many others possible depending on what you're doing with your assets and how youre rendering and presenting them. Displacement, occlusion, all sorts of stuff. I sometimes use incandesence or ambient maps to fake SSS by painting a faint red glow on a black background in areas like ears, nose tip, lips and eyes.
As its name suggests, Sub Surface Scattering is a complex algorithm that attempts to bounce light around beneath a surface in the same way that it does in reality. Beyond that I'm not sure I follow what you mean by 'how' they work. Sounds to me like you're wanting to get to higher level rendering theory? This is an awesome book for that stuff: http://www.amazon.com/gp/reader/1562059548/ref=sib_dp_pt/002-3899493-7024832#reader-page
but it's not geared toward skin. But you will find out what stuff like ambient occlusion and caustics are.
you might enjoy this read..
I'm starting to play with some in-game lighting options now, like that pseudo-BRDF I mentioned in the other thread, plus some other shader ops like rim lighting, light-oriented masks, normalmap tricks, etc.
I was curious about your take on realtime skin lighting, if you saw anything promising lately, besides those shaders from J.I. Styles and Ben Cloward (which are pretty nice btw).
In regards to skin specific, if you're using a depth buffer for your shadows, use that to create a depth volume for sss on your models so you can differentiate between thickness of surface and light penetration.
We have some interesting controls going into the specular bits, don't know if it'll be enough yet.
First is separate spec-width controls for R,G,B, plus an overall scalar.
2nd is bump alpha being per-pixel scalar for specular/reflection/transmission.
3rd is per-pixel specular color, gotta have that.
4th is that BRDF thing (thread), which sounds like it'll allow tight control over fresnel-like effects, except it's light- not camera-oriented. Sounds like you're talking about camera-facing fresnel though. Hmm.
5th is this other control that biases the light between straight-on and sideways-on, which is then perturbed by the per-pixel normals. Kind of a "rim amount" spinner. This might be camera-oriented, need to check.
6th is this interesting (but potentially expensive) masking technique we call "veils" that lets us blend between multiple surfaces based on gradients, which can be oriented/constrained to the light, the camera, another object, etc.
Oh well, kind of blabbing here. Stimulating though, wondering about these things. Curious about the depth buffer idea.
Seems on-topic to me btw.
Ideally you'd use the depth buffer with floating point precision per object -- then you have a range from paper thin (0) which would be full transmission minus surface density, to a user controlled cutoff value (your "roof" value where the object is too thick to let any light penetration through at all). The trouble there is once you've got that range and clamp it to your values, you need to do the scatter radius/co-efficient, and that means a render to texture and blur, or do a point search per pixel to neighbouring pixels. I'm sure there's a few other ways too but the problem is that then gets into raytracing territory
The nvidia demo in the first post uses the basis of this method but they also have occlusion and base it solely off the ramp.
Not sure about how we can do the occlusion part though (without some programmer time).
Why do the scatter radius? I did a quickie approximation of our veil effect in Max (waiting on our material makeover), and it seems like this could work without a scatter/blur.
Biggest problem I see is that the depth is per-surface, not per-finger. Oh, and computation cost, but let's just ignore that for now.
I thought the blur trick was when you render a lightmap, then blur that, because it tends to grow outwards, simulating the subsurface scatter. So it's not really a depth effect at all, it's just expanding/smoothing the area that the light hits...
Here's the nvidia write up, a really good read:
http://download.nvidia.com/developer/presentations/2005/SIGGRAPH/Truth_About_NVIDIA_Demos.pdf
The blurring of the depth test is pretty much to simulate the scattering part of the sub-surface light transportation -- in other words a cheap way to soften up the geometrys effect in the process so it's not just straight linear light transport through one side and out the other; you get a scatter angle happening from impurities within the volume bouncing light through as well as backwards and forwards (if you animate that hand turning around you'll see the difference of the faces when their normals start to become perpindicular -- you can see this with the sharper bands of gradient in the pic).
as such it's not truly needed, but it's another level of control and kludges a look that's closer to being "more right"
I find the thin-skin translucency thing is way overdone - in real life it's a very subtle, and rarely seen effect except in certain special cases (sunlight coming through the ears). I've seen far too many people slamming on an SSS shader and cranking it up, and ending up with the glowing ear tips syndrome. I don't like that at all.
I'm sure it has it's uses in-game, at special moments only (nuclear blast going off in the background - bat wings in front of sun, etc) - but for a genreal purpose I find it obnoxious. Maybe because it's the "hot" thing, it's being overused, and used improperly.
Remember - skin is subtle. Soft shading, and good texture maps will take you %99 of the way there. Most of these effects are very expensive, it's probably better to make better textures and put 3X the number of characters on screen. Save this crap for special moments in the game.
Example of overused SSS shader (why the fuck are the ears glowing?):
http://206.145.80.239/zbc/attachment.php?attachmentid=24487
(drinking always gets me in a ranty mood )
absolutely agree with you -- it really should be a subtle affair with skin. I'm interested in a wide application of such a technique - yes the ears should not be bioluminescant like a jellyfish, but at the same time it's quite obvious when there's no thin penetration at all through a volume (and blurring the lightmap unfortunately doesn't get this). Doing a lightmap blur is a good solution to light wrapping, but not light going through a surface - the matrix movies all suffered from this, the solution being to make sure there was enough ambient to dispell any backward facing dark spots. So that's an easy way to get around it is just have no harsh lighting conditions. easy done. Any light condition with harsh single point light can really do with it though -- virtually all the survival horror games suffer from concrete characters when it's lit by their single oddly small-coned flashlight.
Like you pointed out, it's all really not needed, but is a desirable in certain conditions (which really should be in the minority). View-hands lighting up when casting a fireball in an fps... membrane of wings... marble surfaces... vegetation... from making in-game food look appetising and not like concrete, right up to that putrid looking giant grub boss.
http://www9.informatik.uni-erlangen.de/Persons/Stamminger/Research/Research/tsm