2

I have arbitrary PNG with a silhouette. Could use it to texture plane in Three.js. Transparency works fine. But I need to create dynamic glowing around given shape.

More likely, have to use a shader, but could find any reliable example with texture, not object.

Is it possible to make it or the only way is to convert the shape to OBJ or any other format and to apply a glowing shader to mesh, like here?

VVK
  • 435
  • 2
  • 27
  • This is just an idea, but as you are trying to glow a texture, maybe you could save the glow in another texture and have a shader that just multiplies this texture value by a multiplier (glow intensity) uniform value. Or maybe 1 image, using 1 channel as alpha (main lion body), 1 channel as glow. I hope that all made sense.. haha – 2pha Aug 03 '17 at 00:30
  • Interesting, worth of trying, cheers! – VVK Aug 03 '17 at 11:51
  • I would average nearby texels (up to some radius) for each fragment. If you add some randomnes to it it could create nice effects...also the radius or shape of averaged area can periodically change (modulation by `sin(t)`) Even cooler would be to add particles simulation inside fragment based on the averaged texel value (gravity field) and basic Newton d'Lambert physics like the GIF at bottom of here [Effective gif/image color quantization?](https://stackoverflow.com/a/30265253/2521214) another option is [2D raycasting light effect in GLSL](https://stackoverflow.com/a/34708022/2521214) – Spektre Aug 18 '17 at 10:06

0 Answers0