How to create an aura for unit?

Hi. I guess this is a broad question but I’m trying to think what is a hopefully good but mainly fast way to build an aura around a unit (which is a babylon object made of multiple meshes). I’d like to know what are some reasonable easy options to do so.

The basic idea is to have an obvious way for the user to differentiate some units that are special from another units that are not.

My knowledge: I was able to code a basic shader that adds some color to existing textures to solve other problem. I don’t know much about 3d concepts in general.

Some things I can think of (but I’m not sure how doable they are):

  1. Add emissive light to the mesh.
  2. Create a shader over the unit’s texture with an animation.
  3. Add a light object around the unit (no idea if this is possible)
  4. Some way of adding an aura outside the unit AND with animation, but not sure if this can be done because the shader would have to be projected in the ground but also in some ground elements (like forests, villages, etc.) that are below the unit but are not part of the ground.

Also, I don’t have in mind an specific kind of aura. I think it should be something else than just adding some color / light to a texture (if that were the case I’d just use a shader), it can be either an animation in the unit texture or also it could be something outside the unit, like in this image:



For example, if this unit has aura it should have it over the forest and the ground, which are two different meshes. That’s why I think using a shader maybe is not the best way to do it.

Maybe some particle effect?

Hi hhaamm,

Sounds like a highlight layer might be just the thing for your use case. (Particle systems and camera-facing 2D effects could probably also do well, but might take more work to add and get right.) Best of luck!

P.S. If you’re curious about what other kinds of visual effects come ready-made and documented in Babylon, check out the Examples page from the Babylon.js docs. That page is full of working code demos of lots of cool effects just waiting to be adapted, enhanced, and used. :smiley:


Using highlight layer worked for me. Thanks a lot!