Real Time Skin Shader - public release.

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2005   #1
Talking Real Time Skin Shader - public release.

Hi everyone, I'm not a big poster here, but I thought I'd make a post to mention I've released an HLSL skin shader I've been working on recently.

features:
-It's HLSL, so usable in most 3d apps directx viewports
-Translucency/SSS
-Normal map lighting model
-front on and fresnel specular
-attenuation blooming (simulates the effect of harsh translucency blooming)

It has its shortcomings and limitations, I'm an artist not a coder so the code is ugly, and it only supports one light at the moment... however, you can get some damn nice results, so enjoy, and post your results!

Here's a quick example of what it's capable of:
Skin shader example 01 (The Squishy)

go here to grab it!

To understand how to apply HLSL shaders, Ben Cloward has an excellent tutorial on the matter in 3DSMax here.

edit:
Here's a quick overview of how to use the shader:

Directions:
In regards to the settings, it defaults to some more stable base numbers and plugs in the blank_ textures provided. It's incredibly flexible for a number of different surface type effects, so don't be too worried about moving too far away from these defaults.
I suggest first moving the light source far away and balancing out the settings translucency settings so that the bloom settings won't be interferring with this initial setup; move the light closer and play with the attenuation bloom/focus controls seperately. Fresnel settings are dependant on the base specular settings since it's all one pass, so I'd suggest doing the base spec settings then go onto the fresnel stuff after that's all good - just check the glancing angle flare that the fresnel settings give by rotating the view around your model. Pretty easy, but it all can be very tweaky.

Texture passes:
- Diffuse: RGB, alpha is not yet supported.
- Specular: RGB is the colour and power of the specular component. The alpha is the glossiness of the specular.
- Translucency: RGB is the colour and intensity. The alpha is the amount that the light can bleed along the normals (which in turn is then amplified by the attenuation bloom) - think of the alpha like the internal depth, and the rgb like the density of the internals... so alpha is the scatter radius and rgb is light penetration amount.
- Normal: rgb, xyz... pretty standard

Last edited by jistyles : 09 September 2005 at 04:53 AM.
 
Old 09 September 2005   #2
This is very very interesting indeed. Thanks very much for posting this up, I've been looking for something like this for quite a while. Kind of scared to see you paint, model, texture AND code, it can't leave you much time in the day.

I've done some very quick tests and have a couple of questions.

The great 'squishy' images show a different set of controls to the ones I'm getting when I download the shader and run it in Max 7.5. I'm wondering whether the UI shown in the images is the final one or the one the shader gives when loaded. For example the image shows controlls for "Translucent Colour" where as the loaded shader has a "Translucency Map" slot.

Does the "Trandlucency Map" control the colour and strength of the translucency effect or just the strength with a hidden 'fixed' translucency colour?

Have you thought of adding a ambient look up term, either to two colour swatches for world up and down or to a low rez cube map? Our initial tests show seems helpful on a skin shader.

Anyway thanks again for sharing this up

Jol
 
Old 09 September 2005   #3
Sweet!!....I was looking for a solution to SSS in 3dsmax, this solution looks real good to me jistyles, and as soon as I get to the stage I will quite readily apply this shader...btw awesome example of what it's capable of man...it looks the ticket to what's needed.....and thank you again so much for posting up a release...
__________________
1920'sPrizefighter .
Hideous
Guy (Final Fight) Re-Design
DWIV
Never enough time!!...

3dblog
 
Old 09 September 2005   #4
Thanks man! That's really awesome! I haven't seen such translucent skin shaders in any of the popular games yet. I'm currently busy on a female. I'll see what the shader is capable of and show you the result

Thanks for your input!
 
Old 09 September 2005   #5
This is fantastic, thank you for sharing this. Can't wait to try it out, just what i was looking for. Excellent work.
 
Old 09 September 2005   #6
thats so nice
Thanks a lot. I've made a teapot test and it works excelent. I'm looking forward to map it on everything I can find on my machine.

cheers
florian

btw: Cool game art on you site
__________________
excuse my englisch

sexy panda with balls
girl
fighter WIP
pencil present
chicken
 
Old 09 September 2005   #7
Congrats on such a cool shader, Joel! I'm going to be using this one a lot. I'll also be learning a lot from how it works! If you're interested in making it support multiple light sources, it's pretty easy to do. You can break it down so that each light is one pass. You can take a look at my Normal Map Specular shader to see how to do it:

bencloward.com/shaders_NormalMapSpecular3lights.shtml

This shader supports three light sources and just runs three times, once for each light.
__________________
Ben Cloward
Technical Artist

HLSL Training DVDs
| ShaderFX | HLSL Shader Thread | My Shaders | Free Textures | Tutorials



Last edited by bcloward : 06 June 2006 at 05:54 AM.
 
Old 09 September 2005   #8
Talking

This looks quite good. I might just give it a bash.

Thanks for posting it

Are you going to release updates for it?

~M~

PS: Some quality work on your site by the way
__________________

Last edited by mindrot : 09 September 2005 at 05:49 PM.
 
Old 09 September 2005   #9
Hey! You got it done!

Nice job man it works really well!

I think its time you unleash your 3d skills upon cgtalk with a new detailed model that takes advantage of this shader
__________________
- My Folio
 
Old 09 September 2005   #10
Hey everyone, glad to see the response is so positive
I'll try my best to answer everyones questions.

Jol: Thanks for the comments! The squishy image is an older work in progress test model I made just for the purpose of authoring this shader... as such the settings are from the shader at an earlier stage of life. I will put up a quick set of instructions on the use of the shader in the first post to help the learning curve along a bit.
The world up/down ambient lookup sounds like hemispherical lighting - I'd considered doing a few improvements to the lighting model like that, but before then I will need to optomise the current code. It's pushing the limits of 2.0 pixel shader instructions just in terms of amount of instructions... it's not that it's slow, more that it's just sloppy code

johnwoo: Hey cheers! I really like your work, so I'm going to be very interested in what you're able to pull off on your gorey organic characters. The shader does have its limitations so doesn't really stand up to the vray or mental ray pre-rendered shaders, but for a real time pixel shader you can get some nice looking results

FeRdI: You're welcome dude! Thanks for the compliment, looking forward to seeing what you come up with!

CG_Gordon: Thankya!

florian: hahaha There's gotta be at least 20+ skin shader teapots on my computer from developing this thing, it's like they're still multiplying! Glad you like it, feel free to post or email me anything you come up with - I would love to see what people do with it - and thanks a heap for the compliment!

bcloward: Hey Ben! Thanks for the kind words - you helped me a great deal in learning to author shaders, and I'll be sure to give the multiple light support a go after I've optomised it. The 3 light setup looks pretty easy to implement, nice and elegant way you've gone about it! good job!

mindrot: Heya Mr. Rot, yup I'll be releasing updates - I have plans to improve it to a certain point, so I should be supporting it for a little while yet. Thanks for the compliment too!

Hazardous: cheers JT! and I agree on the whole sharing the art lovin' on cgtalk - good and open international community around these areas. Are you posting your rider updates here? That guy is looking slick Gotta catch you online sometime soon, I've been neglecting IM for a while to shave off time to develop this shader and my own work, so I should try and get an active presence back online huh
 
Old 10 October 2005   #11
Hey everyone, it's been a little while but R3 is now ready for public consumption
The main addition here is the ability to choose from a 1, 2, or 3 light setup depending on your needs, as well as a few minor optimizations and tweaks to the lighting model. Enjoy!

You can grab it from my page here, as well as check the progress: http://www.jistyles.com/main.php?id=doc&page=hlsl

Thanks for sending all the pics too! Seeing people put this to use is what motivates me to improve on it thanks guys, you know who you all are

cheers!
-Joel
http://www.jistyles.com

edit: Just wanted to chuck in the last wip test image too... I think I'll focus on doing a character with this shader and testing it out in a production environment for a bit over the next few weeks. From here I'll probably focus on optimizations and functionality.


Last edited by jistyles : 10 October 2005 at 05:59 AM.
 
Old 10 October 2005   #12
Sweet!!...I'm still experimenting with the 1st release shader, but I'm just d/loading the update now...Unfortunately I won't be applying it to the current w.i.p but definitely for whatever I do next...that is a given certain...and again thank you so much for a generous contribution....you rock man
__________________
1920'sPrizefighter .
Hideous
Guy (Final Fight) Re-Design
DWIV
Never enough time!!...

3dblog
 
Old 10 October 2005   #13
This is a fantastic update Joel, just what I was looking for. Looking forward to trying out on my lunch break.
 
Old 10 October 2005   #14
i downloaded the first one, but didnt get round to using it, this update is a good reminder to get in gear and produce something with it.
__________________
my real current projectio
 
Old 10 October 2005   #15
So can someone render out an image with this shader applied to it?
Or is it for realtime viewports only?
Thanks
B
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:30 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.