|
created Faking SSS for realtime?
on 07-23-2010 01:48 PM
Hey, I was sure I saw something about this around here somewhere, but after spending ages searching, I decided to ask away. Anyone have a tutorial regarding faking SSS in unreal? I would need it for my foliage.
Thanks in advance!
|
, dedicated polycounter,
1,458 Posts,
Join Date Nov 2009,
Location Montreal, QC, Canada
, Polycount.com Editor,
13,917 Posts,
Join Date Oct 2004,
Location Seattle, Wa
|
transmissionMask and transmissionColor are things you might want to experiment with since they are just for that.
|
, polycounter,
865 Posts,
Join Date Jan 2009,
|
You may be better of searching for translucent shaders than SSS for foliage. Why dont you look at the GDC 2010 tech demo scene that ships with UDK? thats covered in foliage.
Last edited by r_fletch_r; 07-23-2010 at 03:33 PM..
|
, veteran polycounter,
2,970 Posts,
Join Date Feb 2010,
Location Ireland
|
Ahhh so THAT is the term I needed. Gotcha. Thanks!
|
, dedicated polycounter,
1,458 Posts,
Join Date Nov 2009,
Location Montreal, QC, Canada
|
I hope this is useful, I based it on the way Crysis handles SSS (although they do it on a per vertex basis I believe) for one of my schoolprojects.
They plug into both the Transmission and Transmission Colour slots.
Goodluck!
|
, vertex,
43 Posts,
Join Date Jul 2010,
|
That is sweet Nielsen. Actually just saw the paper they had, while I was looking for stereoscopic in Crysis 2.
WebGL Project - In a state of constant flux so might be down when you check it. Pretty old now.
Junior Technical Artist at Digital Extremes.
|
, dedicated polycounter,
1,859 Posts,
Join Date Nov 2009,
Location Toronto
|
thats brilliant stuff nielsen. the kind of shader construction that seperates the boys from the men 
|
, polycounter,
865 Posts,
Join Date Jan 2009,
|
Considering that Crysis does it per vertex, and you do it per pixel (I assume), wouldn't that make it terribly slow in comparison to the Crysis solution?
|
, triangle,
376 Posts,
Join Date May 2010,
|
I think it depends on how he is calculating the vectors. As I recall Unreal lets you do it per vertex
|
, veteran polycounter,
2,970 Posts,
Join Date Feb 2010,
Location Ireland
|
I can't say for sure whether this is calculated per vertex or pixel, I'm guessing the latter though. I suggest you use this on important assets only or swap out materials on the LOD as soon as possible.
It's a start anyways 
|
, vertex,
43 Posts,
Join Date Jul 2010,
|
I just did a quick test, and indeed it looks awesome. 
|
, triangle,
376 Posts,
Join Date May 2010,
|
Interesting topic, I've been interested in faking SSS in game art for a while now, but I've been thinking about it in a different way (for characters). Is it possible to bake down an SSS pass like an AO pass and just overlay it on a characters diffuse? I know it wouldn't technically be SSS but it would look nice around the ears/nose to have some soft red showing up... saves painting it in :P
|
, Banned,
5,305 Posts,
Join Date Dec 2008,
|
well the most simple way would be using the inverse of your lighting multiplied by a colour, multiplied by a mask (i.e. your SSS pass, but as this is highly view and light dependend a thickness map would be what you need), basicly what it does is brighten up the areas that don't get hit by light, dependend on the thickness you give it with the mask, the colour could be another texture or just a solid color.
|
, veteran polycounter,
3,191 Posts,
Join Date Sep 2006,
Location Berlin Germany
|
You should look at what Nvidia did in their 8 series tech demos. Anything here so far has just been a really broad fake of thin object translucency there is no scattering going on at all.. kinda akin to what specular is to reflection.
The Nvidia stuff actually simulates the diffusion with blurred RTT bakes of the objects diffuse lighting and SSS weight maps. its awesome, Shadows and diffuse lighting are diffused in the skin in a pretty accurate manner.(based on real values sampled from human skin)
The Shader VIG posted was based on the Nvidia method but it uses blurred normal maps instead of RTT (no shadow diffusion)
Last edited by r_fletch_r; 07-26-2010 at 11:00 AM..
|
, veteran polycounter,
2,970 Posts,
Join Date Feb 2010,
Location Ireland
|
WebGL Project - In a state of constant flux so might be down when you check it. Pretty old now.
Junior Technical Artist at Digital Extremes.
|
, dedicated polycounter,
1,859 Posts,
Join Date Nov 2009,
Location Toronto
|
Whats also nice is they're actually concerned with preservation of Energy levels and correct gamma.
http://http.developer.nvidia.com/GPU...ems3_ch14.html
Last edited by r_fletch_r; 07-26-2010 at 12:17 PM..
|
, veteran polycounter,
2,970 Posts,
Join Date Feb 2010,
Location Ireland
|
Yeah I saw the deal about gamma. On fxphd, if you look at the course mental ray techniques, a nice talk about gamma there. Didnt even know about that!
WebGL Project - In a state of constant flux so might be down when you check it. Pretty old now.
Junior Technical Artist at Digital Extremes.
|
, dedicated polycounter,
1,859 Posts,
Join Date Nov 2009,
Location Toronto
|
Zap is a legend. I'm enrolled in that course at the moment. If you have the time you should do it. the information there so far isnt really mentalray specific its all about light and rendering.
|
, veteran polycounter,
2,970 Posts,
Join Date Feb 2010,
Location Ireland
|
Nielsen, any idea how to prevent your SSS hack making leaves glow when you look at them when the sun/light is directly behind you. I'm no good at math, especially anything vector related :P
|
, triangle,
376 Posts,
Join Date May 2010,
|
Hm, that is not happening to me at all.
Can you post a screenshot of both your network and the actual problem?
|
, vertex,
43 Posts,
Join Date Jul 2010,
|
Actually I think it was because I didn't use a normal map texture, I just used the light and camera vector dot product. And with trees I used transmission masks that were boosted beyond 1 (brightness that is), same thing with colour. I just multiplied the SSS mask with a 3-vector constant before plugging it into transmission colour.
|
, triangle,
376 Posts,
Join Date May 2010,
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Copyright 1998-2012 A. Risch
|