View Full Version : bluring the rim of an object (and not in post)
sentry65 04-06-2002, 02:31 AM Ok, chances are this can't be done, but thought I'd ask everyone here.
say I have a bunch of objects, most are overlapping and I want to blur their edge (not polygon edges - more like bluring the alpha of an object)
I want to soften down the really harsh edges - all of them - 100's of objects. As you can see, post isn't an option cause I'm not about to render a pass for each object.
I've tried mapping transparency with the facing ratio for parts that face away from you, but that isn't exactly a blur and also affects parts of the objects that are not on the edge and are more in the middle of its "alpha"
maybe something to do with depth blur in regards to local object space - something like that?
any takers?
|
|
sentry65
04-06-2002, 03:02 AM
Ok, I'm a step closer
If I render out a frame of my scene with everything using a neutral material like a default lambart, then use that map as an input to the depth of field - it works
However now I need a shader that will only render out the edges/rim of objects kinda like a toon shader.
NickolasYounker
04-06-2002, 03:11 AM
:confused: I'm not sure if I'm qualifiedto answer this but I'm going to try some directions.first off...(I'm using a square poly face to describe to use as an example) Is this blur a flat blur off the edges or a volumetric blur which permiates from every direction of the edge? Does the blur have depth?
NickolasYounker
04-06-2002, 03:12 AM
Have you tried taking a ramp( black, being the middle.. and white being the outer edge) black=0,white=1(this might be in reverse b=1,w=0::I always get them mixed up..I'm not a math wiz) Anyway... write a script appling the script to the D.O.F.(Depth of Field)
If ramp=0,DOF=0(blur of 0),
If ramp=1,DOF=3(blur of 3).
NickolasYounker
04-06-2002, 03:13 AM
now this isn't the right script but, it is a direction.( rather than appling it to the DOF..what about to the multipass or a volumetric gas of the same color to simulate a blur) SOMEBODY FIX SOME OF THIS>
Deepray
04-06-2002, 03:32 AM
Well.. you can try to make 2 render layers... one with the "normal" image from one scene, and another with the same scene, with a B&W toonshader... white for the edges, or siluette, and black for the other. You can use this second layer like a mask for a bluf fx y postproducction...
sentry65
04-06-2002, 04:05 AM
thanks guys,
so far I've tried the toon shader method - actually none of them worked, but one that was actually a plug in .exe stand alone program I got at highend3d.com - it can detect edges, and I can thicken those edges via bluring and multiplying, and use as a blur mask.
problem though is I'm really only interested in the outer edge of the "would be alpha" (meaning if you were to render the object by itself) and not edges within the alpha of each model.
So, I guess what I'm trying to do is have maya create an alpha for each object, detect flat 2d edges within the frame (being able to control width would be nice) and then it would composite that all together and that's what it would render out. Then that could be used as a post blur mask. I'm just not sure maya can easily detect edges.
I'm not the greatest at scripting and this is currently beyond my ability of scripting, but I agree a sort of UV ramp that would be black in the center most part of an object and then a white outline around the edges of the individual object alphas
CGTalk Moderation
01-13-2006, 03:00 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.