PDA

View Full Version : Lighting an SSS shaded object from within


joltnarc
09-21-2006, 04:33 AM
I had an idea to make a phoenix egg with a bird-like fetus inside. The special part is that the fetus itself glows and the egg should react accordingly.

The best I've been able to do so far is a fast skin shader with a speckle map in the bump slot for a bit of texture. I placed a test cube inside with the same texture as the egg to see how it reacts, and its properly blurred like you would expect.

http://img133.imageshack.us/img133/4083/eggsamplelb6.jpg



If you look closely, you can see a blurry spot of a cube at the widest part of the egg, dead center. The problem is all my attempts at making that cube glow (mostly a combonation of sss and glow shaders, moving around lights inside and out of the egg and trying to make the inner part reflective to reflect photons onto the egg) result in the cube disappearing all-together or nothing different than what you see above. My ultimate goal is for there to be no lights in the scene other than whats in the egg if its even a light.

Any ideas on how to get it to work?

jussing
09-21-2006, 10:48 AM
Hm, I'd cheat it in compositing: (but then again I have no experience using SSS shaders)

Render the fetus alone, in a seperate pass
Render the egg with a sss/translucency map (because you want veins or otherwise organic stuff in the surface of the egg to block light in some places more than others)
Render the egg with an "ambient omni" at the place of the fetus, with a decay
(you can fake this with a simple texture gradient instead, the idea is to brigthen the parts of the egg the closer they are to the fetus)
Render the egg with falloff/fresnel
Basic color pass
So, layer it something like this (top-to-bottom, first layer on top):

translucency map, multipled with ambient omni pass
fetus pass, blurred and at 25% opacity, set to multiply
falloff pass
color pass
....or something like that. The basic idea is that the sss pass, falloff, and ambient-omni-with-decay combined should be able to give the illusion of a translucent egg with light from the inside. And if you can somehow put the blurred fetus in there at low opacity, behind the sss texture, you can really make it look volumetric.

If you want to make it look more volumetric, you can render another pass only with spheres or 3D veins (or other 3D gooey organic stuff), all placed inside the egg shape, but rendered without the egg. Then you can blur this layer, like the fetus layer, and apply it at low opacity behind the sss texture pass.

This is all theoretical, I've never tried it, but I bet it'd work. :)

Good luck,
- Jonas

joltnarc
09-21-2006, 04:33 PM
Thanks! A few other people told me to just cheat and composite the egg, but yours is definitely the most complete answer. You even answered my next question on fixing ways to make it look more egg-like instead of having no "guts".

I give in and will go the compositing route, but does anyone know how to light the egg from within for curiosities sake?

Aneks
09-29-2006, 02:52 AM
I personally feel that when using SSS compisting is essential for control. I generally combine SSS using screen or add. then mutliply by occlusion. finally adding specular.

You should have no problem lighting an object from slightly behind to acheive a similar fake to SSS lit from within. otherwise make a smaller offset duplicate of the egg madel and this will catch the 'interior' light of the object.

http://www.tahlniran.com/nk/sss_comped.jpg

CGTalk Moderation
09-29-2006, 02:52 AM
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.