PDA

View Full Version : Creating Sepia tones


mmurph
04-26-2008, 12:33 AM
Well this is my first post here at CGTalk so I thought I would try to make it good. For my Shading and Lighting final project I am required to use sepia tones. The downside is I can't use any post processing. I am using Maya and am limited to it's Software renderer.

What I am trying to create is a shader that I can plug any file/texture/color into and have that file/texture/color's RGB values change into a Sepia tone. Referring to this equation (http://en.wikipedia.org/wiki/Sepia_tone), in order to get sepia tones I have to add modified R, G, and B values of the original image together to get a sepia tone.


So this is what I got:
http://www.himynameismurphy.com/sepia_shader.jpg

What I did was map the checker1's outColorR into Red_remapColor's colorR, colorG, and colorB. Red_remapColor's Red, Green, and Blue have the decimal values of Red in the equation (R=0.393, G=0.769, B=0.189). I did this for both the outColorG and outColorB using their sepia tone decimal values respectively.

Then in order to add each value of R, G, and B back together I outputted each remapColor's respected value to the Sepia_remapColor ultility (i.e. Red_remapColor's outColorR into Sepia_remapColor's colorR).


Unfortnatlly something is not working correctly, you can see the result I get by looking at the blinn. However when I take those same two colors from the checker1 and (once again referring to the wikipedia page) apply a sepia tone to them in Photoshop I get this:

http://www.himynameismurphy.com/sepia_tones.jpg

Using Photoshop and applying the Hue/Saturation values as the wiki states without colorization gets a result close to what I am getting in Maya. So what it seems like is I need create that "colorize" option however I am stumped and have no idea what to do now. Any thoughts? Am I on the right path?


Any input will be much appreciated, I've never tried doing something like this within Maya and not in post so any and all suggestions or ideas are welcome, thanks!

Goulash
04-29-2008, 10:29 AM
Michael,

In After Effects, I've gotten interesting Sepia looks by using Tritone. Since you have to do it in Maya, you could try this...

1. On your "color node" (whatever you're feeding into the shader for color), scroll down until you get to the effects section. There you'll find 'Insert color remap." (You can create the shader network from scratch if you want by using the two nodes I mention in the next section).

2. Click the insert button, and it'll create 2 nodes: RemapRgbToHsv and RemapRamp. If you set the top ramp color to white, the bottom to black, and the middle one to some brown color, you should get a decent sepia effect. I did this with a checker and it basically yields what you posted by using Photoshop's colorize. You might want to use an image file for testing it, since it has more midtones and will yield a more interesting effect.

Let me know if this helps you out or if I totally missed the mark.

Good luck!

- Justin

CGTalk Moderation
04-29-2008, 10:29 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.