Forum

Different Glow styles?

08 December 2014 15:16
In the documentation it says there are different glow styles like constant. But i can't find how to use them.
Maybe i'm just looking in the wrong places but in Blender under Object info tab where all the other glow settings are i can't find it.
Preferrably i'd like to set the style by code so this would be the optimal solution :D

Thanks in advance
08 December 2014 17:55
Hi, Christoph!

As seen from documentation:

"The glow effect can be activated by an application via API. The different models can be applied such as constant glow, fading out glow, pulsatory glow and any other. In order to enable the glow effect on a certain object it’s required to enable the Selectable checkbox on the Object > Blend4Web panel."

some API methods are required. Unfortunately, there isn't description how to do it. Maybe we should update the documentation to make it clear.

Anyway, you can use these methods from the scenes.js module:
set_glow_intensity() - constant glow
apply_glow_anim() - animated glow
apply_glow_anim_def() - animated glow (default settings defined in Blender under Object info tab)
clear_glow_anim() - remove glow animation
set_glow_color() - change glow color

For example:

scenes.set_glow_intensity(obj, 0.5)

scenes.apply_glow_anim(obj, 1, 1, 0)

09 December 2014 16:29
Ahh ok i thought that set_glow_intensity() changed something with the animation.

If I want to fade in to constant glow, how would i do that? My guess would be after period/2 seconds replace the animation by constant glow. But then how would the glow be able to fade out?

Anyway this was already a huge help.
Thanksalot ;)
09 December 2014 18:50
Hi Christoph and thanks for your interest in Blend4Web!

You are right, set_glow_intensity() conflicts with the glow animation because the glow animation itself is some kind of basic and periodic change of intensity. It's just a hint, you don't require to use it in your code. If you need custom solution I'd recommend to implement it in the render_callback() (see main module API). In this callback you have timeline so it's easy to create any effect you want.
05 January 2015 22:48
I can't figure out how to make an object glow. A simple tutorial would be awesome.
05 January 2015 23:07
It's actually pretty easy. Just check here
15 November 2017 22:30
I cannot find set_glow_color() in the API no more. I assume something changed since these Posts. Can somebody please explain me how to acces this property. Thank you very much in advance.
16 November 2017 17:31
I cannot find set_glow_color() in the API no more. I assume something changed since these Posts. Can somebody please explain me how to acces this property. Thank you very much in advance.
Hello,

I think that now the property which is discussed above is called Outline.
So you should take a look at outline related API methods from the scene module
Blend4Web Team - developer
Twitter
LinkedIn
 
Please register or log in to leave a reply.