Blending modes (other than Alpha channel)?

I hope this is not totally newbie question. My background of 3D is mainly from Opengl graphics and I was wondering how to achieve basic “addtive” effect like fire or explosion or neonlight in Blender. I have not found how to do it.
There is halo with texture but it always creates round’ish shape, and can not be used for whole object (just for vertices)
Alpha blending/channel does not make additive effect so it wont work.
What I’m after is “halo” blending mode for whole objects, how it is done in Blender?

(I’m not talking about texture blending mode -> mix, add, mul, neg, they work ok, but they just do it for polygon face color…)

uhh, lemme think about this…

alpha blending equation
destColor = srcColor*(1-newAlpha) + newColor*newAlpha

there is no way to change the equation in the rendering part of blender that I know of.

but, there is another slider in the material buttons I hadn’t considered

the Add slider

mess with it, see what it does, may be just what you need

Hmm… add slider IMO does not do what I’m after…

Opengl style blending function/mode would be nice addition to Blender and from programming point of view it should not be too hard to do.

Opengl has few factors for source and destination colors:


sfactor
Specifies how the red, green, blue, and alpha source-blending factors are computed. GL_ZERO, GL_ONE, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, and GL_SRC_ALPHA_SATURATE.
dfactor
Specifies how the red, green, blue, and alpha destination-blending factors are computed. GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, and GL_ONE_MINUS_DST_ALPHA.

What you write was BlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA) and changing it to other is just few lines of code… Hmm… I’ll have to contact someone who is coding latest version of Blender.

Out of interest, is it just fire and so on you are trying to achieve, or something wider?

You might want to try the fire tutorial in the community documentation, which uses particles: I got very realistic looking fire with this.

The link is:

http://download.blender.org/documentation/html/x7193.html

Hope this helps!

cheers

Leon

Thanks for the link. Something wider is in my mind, fire was just general example what blending mode I tried to find.

I made rough image of few blending modes for someone who have not played around with them. (Just using photoshop which does not do real additive blending… )

I think more blending modes can bring more eye candy to blender rendered images.

http://personal.inet.fi/koti/jogi/kuvat/blending.jpg

Yep, you can use additive blending - it’s controlled by the ‘Add’ slider in the material buttons. However you have to enable the unified renderer (in the bottom right corner of render buttons - pretty hard to find location :/)

Interesting, I didn’t know that about the unified renderer…

but the Add slider does work for Halo materials in the normal renderer though…

broken: Nice to know, before your message I did not know any use for unified renderer :smiley: Now there is at least one use :slight_smile: Any idea why it is not enabled in normal renderer??