🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Some lighting thoughts (or, 17-channel textures)

posted in Cypher's Journal
Published August 05, 2005
Advertisement
(note: I have not researched at all on BSSRDFs, so pardon me if I'm reinventing the wheel to a ridiculous extent)
So, I decided to contemplate some more on translucent surfaces. One thing I've noticed early on in my education on light was how some translucent things can scatter light. For example, let's say you're sitting in a bus (like where I am while writing this entry) and the windows have some spots of dirt, due to a piss-poor cleaning job. One thing that the dirt does is scatter light, in almost a bell curve fashion, as shown in the following image:

(as I said earlier, I'm writing this on a bus, meaning I don't have a mouse. As a result, I'm using one of those old laptop nubs, so pardon the crappier-than-normal quality of the diagram)

Image hosted by Photobucket.com

Okay, that turned out pretty badly, btu I think the idea is there. Basically, it's supposed to be a cosine curve raised to some power, with some constant added to it. Pretty much like your standard diffuse and specular lighting. The "diffuse" I'm actually not 100% about, what I obesrved might have been ambient light. Anyhoo, that adds a couple pieces of data to any texture that might be translucent, a straight transmission coefficient (i.e. alpha), a scatter transmission coefficient, and a scatter transmission power. Also, I might want to throw a refraction offset in there, a 2D screen offset. So, what does that bring the theoretical total of texture channels to (in the..."worst" case):

16

Albedo - red, green, blue
Normal - X, Y, Z
Specular - coefficient, power (floating point), fresnel coefficient
Environment mapping - Coefficent, fresnel coefficient
Refraction - X and Y screen offset.
Transmission - Straight coefficient, scatter coefficient, scatter power (floating point)...and scatter diffuse would bring it to 17.

So, any artists and memory whores in the crowd wanna fillet me? A 512x512 17channel texture with 2 FP channels: 4.25MB. Thankfully, there won't be a lot of translucent objects, and that IS a stupidly complex material.

But christ, even I don't wanna see the shader that'll use all that data, considering it's also going to be doing shadowing as well, AND lumping together multiple lights.

It'd be a fun looking material though, doncha think?



for the non-graphics guys: I'm currently watching Cool Runnings on the bus. How the hell did the Jamaican fad never catch on?
Next Entry Hmm...
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement