Jump to content

translucency/subsurface shader!


jimmyb

Recommended Posts

A general idea i had about faking subsurface scattering/ transluency ( without any raytracing, and with "any" shader ) is to composite , ( in fact, many compositing here) the visible face of an object and the invisible face rendered separately, with an enhanced z-depth information... :ph34r:

How to isolate the visible part and the invisible part, and how to make the invisible part visible: by making the visible part invisible! :( ha! ha!

i explain:

Take the example of the sphere: some faces are "facing the camera" : front faces, where N.i<0 , the other are not.

Most of the time (when the surface is closed), the back faces ( where N.i>0 ) are hidden by the front faces)

To make them visible (and only them) (the back faces)

turn opacity to 0 for (N.i<0)-faces ( that's what i meant by "making the visible part invisible")

turn opacity to 1 for (N.i>0)-faces ( that's what i meant by "making the invisible part visible").

the pass for the front faces is obvious.

Then, for each, encode the distance to the camera (i don't know how z-depth works with opacity, i should try),

that means (ahem) four passes

and... composite using the distance between the two depth images to control transparency.

(i don't know mantra very much, but that may be done in a single render pass )

I hope i was clear enough... and hope it helps!

tell me if it works and make it better! and/or easier...

t'was just an idea.. ( i did not even try to achieve this effect (i've got bugs with my Apprentice version :angry: )).

I had got this idea from the exact paper you mentioned (very good tips at deathfall!).

i don't know if fresnel alone works. You have to encode an information about a volume, that is about, at least,

two planes.

so.

just write shaders...

vex vex vex vex vex vex vex vex vex vex!!

cheers :)

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...