How to extract light from a skinnedMesh?

Hi! I have this problem where a 3D character has a skinned mesh that has to glow.


This is the code for that part. I am using Three.js in React and this is a jsx element created with gltfjsx. How can i make the light appear from this mesh?

  1. Mesh cannot have light in 3D sense - it can be emissive, which means it’ll just be bright but it will not affect surfaces around.
  2. What do you mean by extract?
1 Like

Sorry if extract is not the correct word for it, english is not my first language.

I meant that the mesh in the glb file emits light. Imagine a character holding a lightsaber or a flashlight. The light from them should ‘glow’ onto the character and the scene. In the glb file, it does that, but not in the jsx one.

Usually this effect needs to be faked in some way, because of the limitation @mjurczyk mentions above in most realtime renderers. A common way to do that is to add emissive to the material, and then use a bloom effect to create a glow around that area in screen-space. This will not really illuminate other objects in the scene, but looks similar. For R3F’s documentation on this, see:

1 Like