View Full Version : darken object edges--shader?
Ernest Burden 01-20-2007, 04:03 PM I'm trying to find a way to build a shader to darken an objects outer edges. Falloff and fresnel do this, but are normal based and dont work well of a flat object. Working in screen or raster space is a good direction, but not working as well as I'd like. Can anyone suggest how to darken the outter edges of an object as seen by the camera? S&T might be a way, but its way too slow for animation. Cell render post effect draws a nice line and is quick, but cannot be built into a shader. Also, I'm hoping to be able to find a method that fr2 will render as well as AR.
Any thoughts?
|
|
lllab
01-20-2007, 08:16 PM
the old wireshader from paul maybe?
or you make a uv for each face with BP and use a bitmap texture?
hmm.
not ideal but might work both i think.
cheers
stefan
JoelOtron
01-20-2007, 09:03 PM
You can use the vertex map shader--select the vertices you want darkened--and use that in the vertex map shader. (depends on how your model is constructed)
You can layer it and set to multiply over your base material, or use it in a new shader--and use the vertex map in the alpha channel--with a darkened version of your texture.
ahven
01-20-2007, 09:51 PM
you can try to use gradient in material color channel.
Ernest Burden
01-21-2007, 12:35 AM
Thanks, everyone. But I'm not looking for a line outline (I actually have the wireshader, never used it though) that is stuck to geometry, but a darkening of edges relative to camera space. However you look at an object you will get a darkening on the edges that are showing. Like I said, its what fresnel does so well for round things, just hoping to apply it to any object.
christianS
01-21-2007, 12:08 PM
Hi Ernest
Maybe you could achieve this effect with glow somehow? maybe rendered into an extra channel and invert it in post? Haven't worked to much with glow that much but i think it could be a solution.
Fresnel is great but depends on the surface angle and can't be adapted to flat objects. A shader for flat objects in camera space would need a pass that already defines for every pixel if it belongs to the object and then you would aply some kind of distance transform. I think it would be a post process then (almost like glow).
Maybe the advanced glow option of AR could help?
chris
moka.studio
01-21-2007, 02:03 PM
How about using Sketch+Toon for the oultline, rendered as a separate pass, and comping it later on top of your rendering -
Ernest Burden
01-21-2007, 04:56 PM
How about using Sketch+Toon for the oultline, rendered as a separate pass, and comping it later on top of your rendering -
That would work, but S&T is far too slow for animation. I was hoping one of the shaders could be made to work. I'll try ChanLum and see how that goes--it's designed to work with edges and would only be meaningful from the camera's view which is what I'm trying to do.
The reason for this is to do more NPR styles with C4D and FR2. I'm working through a series of techniques like environment-forced colorations and worldspace distortions. I use lots of noises and gradients in various channels and can do a lot of fun things already. Darkened edges are what you sometimes get when painting watercolors loosely, and I want to be able to use that look.
Right now I'm working on trees, using a few 'seed' models to make infinite numbers of varied trees via noise displacement in worldscape. That makes the models, but shading them is another matter, and flat color with rough, darkened edges would look great.
LucentDreams
01-21-2007, 05:39 PM
if its watercolor why not do it in post.
Ernest Burden
01-21-2007, 06:43 PM
if its watercolor why not do it in post.
Well I'm not trying to completely fake watercolor. I could handpaint my pictures over 3D layouts. I did that for many years. And I do use extensive postwork now to make my work NPR. What I'm doing is exploring ways to do more of the effects I like in the render program so I'm creating an NPR environment. Its an exploration of what's possible and building a 'library' of techniques to use when i need them without spending my production time doing experiments. My workload is light right now.
christianS
01-21-2007, 07:06 PM
Hey Ernest
I did some npr-without-Scetch&Toon-experiments some time ago and compiled them for the c4d-treff-adventskalender one year ago. Its a zip with some example-files and a word-file with some explanations (in english). Maybe it includes some usefull ideas for you (the first ideas are very basic but i also did stippling, halftoning etc.).
http://www.c4dforum.de/calendar2005/kalendertage/dinge/NPRexplorations.zip
If you have some new ideas please post them :-)
chris
CGTalk Moderation
01-21-2007, 07:06 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-2012, Jelsoft Enterprises Ltd.