Sign in to follow this  
AcePilot

1D texture

Recommended Posts

Lately I have been trying to find out how to do cel-shading on a 3D scene... and in most tutorials, i have found the common word "1D texture map". Can anyone explain to me what a 1D texture map is and maybe even why its used? help would be appreciated

Share this post


Link to post
Share on other sites
How much do you know about Dimensions? 3D is obviously Height Width and Depth. 2D is only Height and Width. 1D simply removes one of those dimensions, so you're left with only Height or Width. In texture form this would be represented as a single row of pixels. (I guess you could also theoretically do a 0D texture, which would be a single pixel, but what good would that be?)

In the case of Cell shading, the texture is simply used to control the sharp shading jumps. You find the amount of light a certain area should be receiving and map that to the U texture coordinate. (That's a really shoddy explanation, but it's the best I can come up with at the moment.)

Share this post


Link to post
Share on other sites
A 1D texture map is simply a texture map that is N pixels wide and 1 pixel tall. It is used to map the diffuse reflection component to a color. Briefly, the value of L dot N is 0 to 1 (clamping negative values to 0), so you use that value directly as a texel coordinate in the texture. Since only one coordinate is used (u), it is called a 1D texture map.

This GameDev article explains it pretty clearly: Cel-Shading

Share this post


Link to post
Share on other sites

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

Sign in to follow this