View Full Version : Etching Shader?
SunTzu69 11-22-2007, 08:52 PM Hi I'm trying to get this look, or similar to old style etchings on a shader, anyone have any idea how to get this look quicly and easily, or any way i geuss?
| |
Just run a post filter in After Effects or whatever?
You can also do a lot with the Ramp shader, maybe give that a whack.
shanega
11-23-2007, 02:03 AM
You can look at the Advance Renderman book, which describes exactly how to write this kind of a shader. It is given in Renderman Shading Language code, but could be converted to MR. Using Gonzalo Garramundo's MrLibrary package you could even almost write it in RSL form, just adhering to C/C++ coding conventions. Maybe not trivial, but I'm positive it can be done.
I suspect the RSL code for this shader is on the web somewhere already. A quick Google should show it.
- SGA
MasterZap
11-23-2007, 11:22 AM
You can do this pretty trivially with a gradiens running along the "paint stroke" direction, multiplied by a normal lighting, and threshold that. Combine this with some mr contour shading and you can get something like this:
http://i51.photobucket.com/albums/f366/MasterZap/its-art.jpg
All pretty simple really... the thresholded gradient will become like thicker/thinner pencil strokes, and since it's multipled w some standard shader before, we get thicker/thinner strokes varying on incoming light.... you can make your gradients wavy like here (noise displaced coordinates) etc. etc....
Here's another one....
http://i51.photobucket.com/albums/f366/MasterZap/its-art2.jpg
EDIT: Sorry this was too much fun ;)
A final one....
http://i51.photobucket.com/albums/f366/MasterZap/its-art4.jpg
/Z
Emil3d
11-24-2007, 01:40 AM
Awesome effect master,
Provided you made this in Maya for the purpose of educating us, could you please share the scene? I have troubles reproducing the exact appearance. To reduce the file size, just one sphere or box on a plane would be enough.
Thank you for your help.
jupiterjazz
11-24-2007, 12:12 PM
Hi I'm trying to get this look, or similar to old style etchings on a shader, anyone have any idea how to get this look quicly and easily, or any way i geuss?
Use Maya Toon for both *shading* and *outlines*.
It offers a higher artistic control on the effects, shading wise you can build up your own network in hypershade and control finely the look of both toon shading and outlines. Also the outlines are controllable in unimaginable ways, and you can see them in the modeling view, not just at rendertime.
Ah, they work with *any* renderer.
Here some renderings from the maya toon examples shipped with Maya similar to what you ask for:
http://www.jupiter-jazz.com/public/teapot_pencil.png
http://www.jupiter-jazz.com/public/teapot_sketch.png
Maya's plugin Expressive Effects from Dave Gordon was also doing amazing imagery, but I don't know if he ever recompiled for latest Maya versions.
http://www.algorithmic.com/efx.html
jbradley
11-24-2007, 06:02 PM
I too would love to check out your methods Zap... that looks much easier to deal with than the Toon method in Maya that is currently available.
i know paolo pointed it out, but man, it's just horrendous to mess around with that stuff. With some of the bugs with fx lines that cross the camera frame, I don't find it friendly or efficient. Try using any of those visor effects on any scene that's even moderately complex - it's impossible to view in context. Even an FX 4500 board and loads of RAM doesn't cut it for even the simplest of scenes using the native techniques.
I like the sound of the simplicity of the connections that Zap might be using... any screenshots or techniques you'd be able to share would be most appreciated. Cool stuff man.
cheers,
jon
CarlRiver
11-24-2007, 08:42 PM
i also liked the work of zap so i sat down yesterday and tried to build a shader like that using his guidelines. this is what i have come up so far:
http://river-carl.com/work/shader_test.jpg
this is the shading network for it:
http://river-carl.com/work/shading_network.jpg
the strokes are generated using a ramp shader. the outcolor of the lambert shader gets then multiplied over it and also added to easier control the highlight and shadow areas. the noise is there to vary the width of the strokes.
the condition node functions as a threshhold, you could also use a set-range or contrast node to get smoother lines.
Maya's plugin Expressive Effects from Dave Gordon was also doing amazing imagery, but I don't know if he ever recompiled for latest Maya versions.
http://www.algorithmic.com/efx.html
Yes, it was great plugin, but never could afford it, but I've done the nice test with it, and that's the gramaphone you see on the left! ;)
The great stuff about the algorithmic are nodes which you could use inside your shading networks...
<---- me icon (shameless plug)
Thanks
Als
That is really cool, CarlRiver! Any chance you can share the scene file?
jupiterjazz
11-25-2007, 01:59 AM
i know paolo pointed it out, but man, it's just horrendous to mess around with that stuff. With some of the bugs with fx lines that cross the camera frame, I don't find it friendly or efficient. Try using any of those visor effects on any scene that's even moderately complex - it's impossible to view in context. Even an FX 4500 board and loads of RAM doesn't cut it for even the simplest of scenes using the native techniques.
Can you provide an example file about those bugs you mention?
Feel free to send it to me.
Anyway, if you cannot control maya pfxtoon, for the outline you have other: mental ray contours (but they are better in XSI rather than in Maya imho) and 3Delight also is doing outlines very nicely without the need of special shaders.
None of the rendetime outlines have the level of artistic control of pfxtoon however, so if you want a special outline look pfxtoon is the way to go.
As per the shading, there is no "method", it's just being able to use Maya shading networks. You can render with any renderer.
Besides the examples with the conditions node that CarlRiver already provided, look into camera projection, sampler info, ramp shader & surface luminance nodes.
You said you have looked at the toon examples already, well it's all there.
If you want outlines in post and you use after effects you should probably take a look at Stefan Minning's stuff, which I just discovered yesterday: http://www.minning.de/software
p
MasterZap
11-25-2007, 09:06 AM
Hi Guys
I actually did my example in mental ray in 3ds Max, but it should be quite possible in maya as well to get a near-identical result, however, I'm not as well versed in the Maya nodes so it would take me a bit to yeild the "same" result... so... since I was already beaten to it, well... what he said:
i also liked the work of zap so i sat down yesterday and tried to build a shader like that using his guidelines. this is what i have come up so far:
http://river-carl.com/work/shader_test.jpg
this is the shading network for it:
http://river-carl.com/work/shading_network.jpg
Looks better than mine, IMHO.
/Z
CarlRiver
11-25-2007, 01:34 PM
here's the download link for the scene file:
shader_tests_v2 (http://www.river-carl.com/work/shader_tests_v2.mb)
and thanks for the compliments
Danke!
.......................
jbradley
11-26-2007, 01:21 PM
Can you provide an example file about those bugs you mention?
Feel free to send it to me.
Hey Paolo - I'll do my best to dig up a scene. If you don't hear back from me in a couple days, PM me here and I'll get to it. Been pretty busy lately.
The bug is pretty straightforward though - reproducible on my end, but I have to find an old scene file that demonstrates it. The shading networks that generate the sketched look (for example, pencil sketch) use PFX lines for the outlined pencil strokes and the shading of shadows as shaders with noise maps (and a texture map from the install). The PFX lines trail out as they reach the edge of the camera frame, almost as if the camera frame is acting as a PFX modifier on the linewidth of the stroke.
I was working on a MetLife spot a couple months back while creating some new sketch looks. I understand the shading network treatments in the samples (but the others provided here are much nicer, imho), it was the outlined strokes I was having issues with.
I know, odd. As soon as I changed the strokes to render as paint, they looked fine. When you go back to render as mesh, the modified linewidth look returns. That was my major beef. I needed mesh rendering, not stroke rendering.
I'll see what I can dig up. I might have to email it to you separately, but I'll PM you when I find something that demonstrates it well.
jbradley
11-26-2007, 01:22 PM
here's the download link for the scene file:
shader_tests_v2 (http://www.river-carl.com/work/shader_tests_v2.mb)
and thanks for the compliments
That's a pretty nice shader network you got there. Pretty similar to the shading networks that are used in the toon/pfx visor samples, but better. Renders faster too... which is always key. :)
thanks for sharing!
CarlRiver
11-26-2007, 01:43 PM
oh man, zap was right. this is just too much fun to play with.
this example uses two noise nodes instead of the ramps. even easier setup and looks even better imho. at least if you're going for that kind of look, that is.
http://www.river-carl.com/work/shader_test_grunge1.jpg
and here's one with some kind of hand painted wrinkle texture instead of the ramps:
http://www.river-carl.com/work/shader_test_grunge3.jpg
have fun
Duncan
11-27-2007, 06:40 PM
...The PFX lines trail out as they reach the edge of the camera frame, almost as if the camera frame is acting as a PFX modifier on the linewidth of the stroke....
If you are seeing effects at the edge of the frame it may be due to the occlusion width scale, although the thinning at the camera boundary is really only noticable with very fat lines. One can perhaps use "line surface" local occlusion combined with some depth bias, instead of occlusion width scale. Or perhaps you had long straight edges. In the first release of Maya Toon there were some problems with large triangle boundaries that could cause thinning or dropout along edges, but this problem was fixed a few releases ago. A workaround back then was to use the toon "line resampling" to breakup the single long line segment into many segments. If you still have such a problem then this may also work.
In terms of display speed, one can simply disable interactive display of Maya toon lines(displayInViewport on toon node, or show strokes) for complex scenes( the shader based outline methods typically don't support interactive display anyways). The problem is often the need to update profile lines when tumbling the view, so it might help to simply make pfx "interactive" in the performance options. The lines will then only update on mouse up. The local occlusion attribute can be slow, so if you are using this it is a good idea to totally turn off the interactive display. However the actual line batch rendering speed is usually quite fast, even for large scenes.
Duncan
jbradley
11-28-2007, 07:29 PM
If you are seeing effects at the edge of the frame it may be due to the occlusion width scale, although the thinning at the camera boundary is really only noticable with very fat lines. One can perhaps use "line surface" local occlusion combined with some depth bias, instead of occlusion width scale. Or perhaps you had long straight edges. In the first release of Maya Toon there were some problems with large triangle boundaries that could cause thinning or dropout along edges, but this problem was fixed a few releases ago. A workaround back then was to use the toon "line resampling" to breakup the single long line segment into many segments. If you still have such a problem then this may also work.
Sweet. Thanks for following up, Duncan. That's exactly the problem I was seeing. The occlusion width scale was disabled though. My original tests were in v8, and it looks as though i cannot reproduce the issue in 8.5 (have 2008, but haven't installed it yet).
The lines were exactly horizontal. It was a front-on view of a very wide set of stairs, with the edges perfectly horizontal, and they did trail off into nothing. Seems to work now, so looks like I don't have to pull out any files for Paolo to mess around with. :)
thanks again.
jupiterjazz
11-28-2007, 10:54 PM
Sweet. Thanks for following up, Duncan. That's exactly the problem I was seeing. The occlusion width scale was disabled though. My original tests were in v8, and it looks as though i cannot reproduce the issue in 8.5 (have 2008, but haven't installed it yet).
The lines were exactly horizontal. It was a front-on view of a very wide set of stairs, with the edges perfectly horizontal, and they did trail off into nothing. Seems to work now, so looks like I don't have to pull out any files for Paolo to mess around with. :)
thanks again.
That's why I was asking for the scene, I know it's just a question of tuning proper paras.
We (me and Sergei Tsyptsyn) pointed out very similar issues in an old masterclass.
Duncan, which does the real magic, doesn't even need the scene!
Sol less work for me this time ;)
p
CGTalk Moderation
11-28-2007, 10:54 PM
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.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.