Image Edge Detect Material Effect
I'm going back through the Lighting & Post Processing DVD and I'm trying to recreate the image edge detect material. But I can't seem to get it to work. Is there something I'm missing?


Which Chain are you using? Because in newer versions of UDK you have to be using the _Console chain as that is the default.
Check line 29 of your default engine ini for the default postprocess chain.
Hmm.
The shader tree looks ok...
Just a few quick thing to check.
- Check that you have the Material effect node in between the SceneRenderTarget node and the UberPostProcessEffect node in the Post Process Chain
- Make sure the Material Blend mode is set to Translucent with the lighting Model set to MLM_Unlit
Let me know if that works 
Do you know if Mr.Prout is on the forums?
Wow crazy :O
I would just pretend that you meant to do it like that...the image with the red around the edge looks awesome! 
and yea, Dave is one the forums http://eat3d.com/users/daveprout :)
Wow crazy :O
I would just pretend that you meant to do it like that...the image with the red around the edge looks awesome! 
and yea, Dave is one the forums http://eat3d.com/users/daveprout :)
I haven't the slightest clue as to why the red thing shows up. I really want to get my material working though.
Did Epic change the way Post Processing is enabled in the July UDK update?
Now all I need to do is figure out how to edit the material to my liking.
LOL!
Nice find mate...glad you got it sorted 
LOL!
Nice find mate...glad you got it sorted 
do you know if there is a way to make the shader look more like a "painted surface"(if that make sense)?
IIRC on the lighting DVD there is a paint daubs effect that Dave goes through...or did you mean a more toon shader type look?
IIRC on the lighting DVD there is a paint daubs effect that Dave goes through...or did you mean a more toon shader type look?
I'm using the paint daubs look right now, so yeah a more toon shader look. But I'm wondering if it's possible to have a brush stroke effect.
I'm trying out the other material in the lighting DVD and I'm trying to figure out how to show the diffuse texture of a model while keeping the outlines. Basically a toon shader. I couldn't figure it out from the other material so maybe this one would be easier.
I'm stating to realize that after watching multiple dvds on UDK materials, I still don't understand the math behind each node. I even went to Hourences website and I still fully understand.
Something like this?
Something like this?
more like a combination between the Poster Shader and the Ink Shader. It seems like this shader on Polycount might help.
I have been really enjoying this thread and want to contribute something. Dave made a few simple packaged to show some stuff off but it never made it into the dvd's project files. So I decided to them here free to the community. (Attached)
I only ask that you point people to this post to download the file, instead of re-distributing it.
| Attachment | Size |
|---|---|
| eat3d_udk_lighting_materials.zip | 7.35 KB |
I have been really enjoying this thread and want to contribute something. Dave made a few simple packaged to show some stuff off but it never made it into the dvd's project files. So I decided to them here free to the community. (Attached)
I only ask that you point people to this post to download the file, instead of re-distributing it.
Thanks a bunch Riki.
I "think" I almost have the Team Fortress 2 shader working. This would be so much easier if I actually know what I was doing.
hey kaze. the tf2 shader from steffen works out really well. i used it as a test for a small project i was working on. The postprocess outline i came up with after watching the lighting dvd, in combination with the tf2 shading gives a really nice result.

with the tf2 shader the maps need to be pretty precise mostly in the specular sections.. as well as the gradient ramp.. that pretty much controls the entire thing. for that i dont really think i changed too much from the original in the above pic, keeping in mind that the maps should have some sort of a hard-shaded texture (which mine currently lacks.).. but ill go back and check my material. the post process material i have is posted here.
http://eat3d.com/forum/dvd-reviews/oniram-udk-lighting-and-post-processing-review
hey kaze. the tf2 shader from steffen works out really well. i used it as a test for a small project i was working on. The postprocess outline i came up with after watching the lighting dvd, in combination with the tf2 shading gives a really nice result.
with the tf2 shader the maps need to be pretty precise mostly in the specular sections.. as well as the gradient ramp.. that pretty much controls the entire thing. for that i dont really think i changed too much from the original in the above pic, keeping in mind that the maps should have some sort of a hard-shaded texture (which mine currently lacks.).. but ill go back and check my material. the post process material i have is posted here.
http://eat3d.com/forum/dvd-reviews/oniram-udk-lighting-and-post-processing-review
did you put the TF2 shader in the Post Process material node or is it on each object. I'm not exactly sure if what I did is correct.
no. i created one "Master Material" and just created instances from which i could swap out textures and parameters.
Yeah mate, youve got to get rid of the other two material nodes. Its applying multiple mat effects to your plate. Just delete two of them and place into the remaining one.
The two new nodes were added in June for the grading.
Theres also a per map slot in world info that was added in may.
in reference to the edge detect material, does anyone know why the scene turns black with white lines? I've been trying to get it so that you only see black lines; like a toon shader. I watched chapter 01-07 of the DVD like 10 time now and I still don't get it.
its because all you're rendering out scene depth. you need to do that because otherwise you would be just simply moving every pixel of the player's view in the direction specified. by rendering the scene depth going in three different directions, you're able to overlay the parts that are "left behind" from the physical pixel shift. you need to take that overall and subtract that from a scene depth.. inverting the white and black, then using an if node, you specify color only where the outline of an object is.. otherwise a scene texture sample (the actual scene itself), is rendered..
tried explaining that to the best of my knowledge, but if ive made any mistake with something someone please feel free to correct me.
EDIT: take a look at the link i posted and u can see the material tree i came up with to achieve the outline only.
At this point I'm really thinking of giving up. After talking to the guy who created the TF2 shader for UDK, it's clear to me that combining an outline shader and the TF2 shader is impossible without going deep into the code of the UDK engine which I cannot nor able to. The Outlins shader I'm using now is from Oniram and I made a few notes for myself in case I want to come back to it.
so wait.. are you trying to globally change everything to have the tf2 shading? or your issue is that simply combining the two individually just doesnt give u the desired result? as far as globally changing things.. yeah ud have to come up with custom code nodes for your materials. sometimes outline shaders even use code in the material (borderlands and dungeon defense). overall ive gotten some great results from the tf2 shader.. just using very basic textures.. (baked normal, AO overlay on solid color for diffuse.. edited level and saturation for spec).
now here's a look at the shader im using.. pretty much exactly the same as from steffen unger.. the only changes i have is that now im plugging directly into diffuse and spec, instead of customlighting. ive never been able to figure out that custom node so i just stay away from it.
http://img.photobucket.com/albums/v666/Oniram/jdshader.jpg
now also this material tree i grabbed a few months ago online. i apologize for not remembering who this shader belongs to, but i do not claim it as my own. i personally have not tried it out but maybe it could clue you into a few things.
http://img.photobucket.com/albums/v666/Oniram/cel-material.jpg
hope this helps.
so wait.. are you trying to globally change everything to have the tf2 shading? or your issue is that simply combining the two individually just doesnt give u the desired result? as far as globally changing things.. yeah ud have to come up with custom code nodes for your materials. sometimes outline shaders even use code in the material (borderlands and dungeon defense). overall ive gotten some great results from the tf2 shader.. just using very basic textures.. (baked normal, AO overlay on solid color for diffuse.. edited level and saturation for spec).
now here's a look at the shader im using.. pretty much exactly the same as from steffen unger.. the only changes i have is that now im plugging directly into diffuse and spec, instead of customlighting. ive never been able to figure out that custom node so i just stay away from it.
http://img.photobucket.com/albums/v666/Oniram/jdshader.jpg
now also this material tree i grabbed a few months ago online. i apologize for not remembering who this shader belongs to, but i do not claim it as my own. i personally have not tried it out but maybe it could clue you into a few things.
http://img.photobucket.com/albums/v666/Oniram/cel-material.jpg
hope this helps.
yeah, I was basically trying to use the TF2 shader and the outline together globally or rather in the Post Process console in UDK. I don't have a clue custom nodes so for now I'm just using an outline shader. I couldn't tell whether or not the TF2 shader I modified was working properly. At least this experience has helped me learn more about materials in UDK.
so i just did another adaptation of the material from the dvd. I had been trying to get my head around doing a distortion effect, simulating what you see in the distance when its hot outside. i got it basically working.. it could use some more tweaking, and its also very dependent on the texture (i just did basic clouds). here's a shot of the


here's a shot of what it does (over exaggerated)

This thread has been extremely helpful in learning some ways to manipulate materials.
On a sorta but not really related note, I've been trying to de-saturate and add some grain to my Gears of War level. I wanted an effect like this picture: http://www.shacknews.com/screenshots.x?gallery=10458&game_id=5483&id=123...
*Please excuse the language on the pic, the pic isn't mine.
I wanted that dark grainy effect and I've been trying to create a grainy material to put in the chain but none really come close to that look. Any help would be greatly appreciated 
-Grant
if you take a look at the september release of UDK, there is now a post process effect called Film Grain. I have not used it yet but it may be something you're looking for.
(From udk.com)
Rendering
- Added ‘ImageGrain’ to ‘UberPostProcess.’
- Improved post processing.
- Uses less memory.
- Better CPU/GPU performance.
- Improved quality and consistency.
- New features such as HDR scale and film grain.
- Optimized distortion pass.
- Fixed multiple split-screen issues causing color leaking.
- 'F5' key now enables shader complexity mode by default.
As far as desaturating, inside of the uberpostrpocess you have an option for highlights, mid-tones, and shadow colors. as well as a desaturation option. Once you nail down a good color scheme for your scene you can then go ahead and desaturate it some. so no need for any material creation. 
also you can keep your uberpostprocess settings as default and add a postprocess volume, which will only apply your color changes to the area within that volume.
So I'm going through the UDN website looking for some speed tree info when I find this, http://udn.epicgames.com/Three/DevelopmentKitGemsSobelEdgeDetection.html. I can't beleive I missed this. All that hard work when I could've just looked it up.
From what I know those UDK gems are a recent thing. The one who brought it to my attention seems to have found it round the end of February.

Wouldn't it be awesome if UDK has a "add stroke" button? 

Wouldn't it be awesome if UDK has a "add stroke" button? 
SO Awesome!!!!!!!!!!!!!!
or at least make it less complicated.
hey kaze369,
was looking at your post about some of the issues you were having with the edge detection materials in UDK and i'm running into some of my own. i'm trying to get the edge detection material (not the image edge one) to work but everything turns black. i believe i have the proper node structure but not sure if its a setting somewhere. did you run into this issue when you created yours?
i've attached an image of my node setup to compare.
is there anything i should look out for?
my current settings are
ScreenPos is flagged with Screen Align
u/v offset is both -0.001
any help would be greatly appreciated!
thanks!
hey kaze369,
was looking at your post about some of the issues you were having with the edge detection materials in UDK and i'm running into some of my own. i'm trying to get the edge detection material (not the image edge one) to work but everything turns black. i believe i have the proper node structure but not sure if its a setting somewhere. did you run into this issue when you created yours?
i've attached an image of my node setup to compare.
is there anything i should look out for?
my current settings are
ScreenPos is flagged with Screen Align
u/v offset is both -0.001
any help would be greatly appreciated!
thanks!
If you read further down the thread I ended up using someone else's material node structure and eventually I found a edge detection shader from the UDN website. The one from the UDN website works really well and has a lot of options to play with so you should go there. The tutorial will show you everything you need to do to make it work.
Probably a late reply and the topic is dead, but have you tried making the material translucent and the blend mode multiply or modulate? with white back and black lines that would probably work. for those looking for a solution, this problem has already been solved here: http://www.polycount.com/forum/showpost.php?p=1061981&postcount=11
how would you create a material like legend of Zelda or Raymond kind of style?



























Hmm.
The shader tree looks ok...
Just a few quick thing to check.
Let me know if that works
www.metalliandy.com | Twitter | Knald Open Beta | 110 Free Custom Bolt Alphas | Barbed Wire Baseball Bat