Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Some lighting thoughts (or, 17-channel textures)

Sign in to follow this  


(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):


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?
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!