PDA

View Full Version : Idea: Color Bleed Node


jeremyhardin
10-18-2006, 05:43 AM
I've been brainstorming on a useful node setup for color bleed without radiosity, and realized it could be simplified into a single node. And hopefully in simplifying, some of the other problems could be addressed as well.

Attached is the node flow. Basically it raytraces from the spot, returning the color it hits. If the color is more than a certain brightness and less than a certain distance, it adds the color to the base color and luminosity.

jeremyhardin
10-18-2006, 05:44 AM
The problems...

1. I can't figure out how to bend the normals. i.e. if a wall is perpendicular to another wall, their normals never hit each other and thus won't bleed onto each other.
2. Too slow. There's no way that I can see to limit the amount of ray tracing. a 1x3, 2x6 type setting. Especially when you add this node setup to more than one surface. It ends up almost as slow as radiosity, only not looking as nice.
3. This is related to number 2 above. Also since there's no way to limit the raytracing, you end up with a perfect reflection on your surface of the environment. If you could limit it, the environment would be scattered/blurred, etc.
4. Some kind of blurring/interpolation of the color bleed?

As far as interface it'd only need a brightness threshhold, a ray length threshhold, and a ray tracing quality setting, i think. maybe a boost HSV settings as well.

Or on the raytracing setting, maybe have some way that it doesn't raytrace from every spot? every other spot, or every third spot, etc.?

Thoughts? I know several of you guys have made nodes thus far. Any of this sound reasonable? Would it end up being just as slow as radiosity? I'm inclined to think it could be faster, given some clever setup.

jameswillmott
10-18-2006, 07:07 AM
What you're describing basically IS radiosity. I've written a node that does what you describe, it was horribly inefficient yet gave the same basic radiosity 'feel'.

I have an idea about how you may be able to trace every nth pixel and interpolate within the node, that could help speed things up if I get it working properly...

jeremyhardin
10-18-2006, 07:20 AM
What you're describing basically IS radiosity. I've written a node that does what you describe, it was horribly inefficient yet gave the same basic radiosity 'feel'.

I have an idea about how you may be able to trace every nth pixel and interpolate within the node, that could help speed things up if I get it working properly...

well, yes it is, but minus the shadows cast? i've worked with shaders in other software (coded by a guy that coded for the matrix films, f***ing brilliant, him), that were near realtime. obviously i don't want realtime results, but I do think a fake colorbleed could be very useful (and speedy by being inaccurate).

interesting that you've already coded a node. by inefficient, do you mean code-wise? or renderspeed-wise? regardless, thanks for the input.

jeremyhardin
10-18-2006, 07:22 AM
how much faster is raycast? maybe it could be used to determine the length, then if geometry is met within the length threshold, the raytrace goes out and returns the color? so raytracing is 'saved' for what will be used?

jameswillmott
10-18-2006, 08:03 AM
interesting that you've already coded a node. by inefficient, do you mean code-wise? or renderspeed-wise? regardless, thanks for the input.

Inefficient in both ways. :) I wrote it early on, before I really knew what I was doing ( I still don't ) and just hacked around code until it worked.

Interesting that you mentioned the rayCast thing. I implemented that as well so it would only rayTrace if the length was below a certain threshold. I don't really know how much of an improvement it made, but it sounded good at the time. :)

Bytehawk
10-18-2006, 10:02 AM
ok this is a wild hunch:

suppose you are only talking about the same mesh, and that mesh is uv'ed
do a check on uv coordinates on a defined UV distance from the spot for the color
do the mixing stuff

problem : the distant spot should be evaluated after all the other nodes, but before it is called on that particular distant spot (i hope i' making sense here)

usefullness :
if you bake the color and then do a controlled blur on the resulting image you would get the same result.

Sensei
10-19-2006, 03:09 PM
Can you show rendered image, or a few, of this effect.. ?

Sensei
10-19-2006, 03:17 PM
how much faster is raycast? maybe it could be used to determine the length, then if geometry is met within the length threshold, the raytrace goes out and returns the color? so raytracing is 'saved' for what will be used?

Ray cast should/could be hundered times faster because it's called by ray trace anyway, but without recursion.. So in other words, if ray trace hits surface that is refractive/reflective, another bunch of ray-casts/traces are issued..

Bytehawk
10-19-2006, 04:07 PM
this is how I achieve some 'fake radiosity' :