Jump to content
  • Advertisement
Sign in to follow this  
adoado

SSS, Realistic Leaves

This topic is 3941 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I am trying to basically get realistic leaves. These leaves are billboards. I have tried several techniques - normal N.L diffuse lighting, using normal maps, etc. They still do not have a translucent effect that they have in real life. I think this is called Subsurface Scattering - and from what I have read it is a costly process - to costly to perform on leaves. I was wondering if anyone had any ideas on how to possibly fake SSS? Or to get realistic leaves ;) Thanks, Adoado.

Share this post


Link to post
Share on other sites
Advertisement
In the DX9 SKD there is a sample called LocalDeformablePRT; I think the technique used there would work great with leaves.
A screenshot:

Share this post


Link to post
Share on other sites
For things like foliage I think a fast approximation is needed.

If you are casting shadows from your tree onto itself then things are easy.. just make the faces pointing away from the sun brighter if they are NOT shadowed.

Otherwise, you need some kind of reverse lighitng term...you can us ea mask texture to control scattering brightness.. I thin it s amatter of fiddling around till somehtinglooks good.

Even in Crysis the foliage doesnt have perfect SSS

Share this post


Link to post
Share on other sites
Subsurface scattering is light rays bouncing around inside the object. A leaf is mostly 2D and I don't think its necessary to simulate this happening at the molecular level to make it look good. Basically you can just simulate the light behind the leaf shining through and illuminating it a little bit. The only visible effect that SSS has is to make that light look more green. Therefore, I think that a good fast approximation would be to use an opacity map to show which areas of the leaf can let light through (eg, not the veins)...and then you can add some ambient green color to the areas that have less opacity.

actually on second thought...it ought to look good enough with just bump, diffuse and specular maps...i think the trick is just in getting good maps.

[Edited by - yahastu on October 29, 2007 12:47:30 PM]

Share this post


Link to post
Share on other sites
Kambiz, thanks but from the looks of that example I do not need such accuracy. Like Matt and Yahastu said I think I need some type of fast approximation. Thanks, though ;)

Quote:

Basically you can just simulate the light behind the leaf shining through and illuminating it a little bit.


This sounds like an awesome idea to look into - but how would I do this - sorry, I am still a beginner at HLSL..

Somehow make the spot directly in the path of the light brighter?

Thanks,
Adoado

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!