I’m currently working on a torch mesh with a pointLight light source attached near the top…
Is there any setting / possible to light up a mesh from the inside? (mesh using PBR material)
Do i have to use the unlit setting?
While this would be possible, it will not look good when taking into consideration:
Changes in PointLight intensity and color (flickering),
and especially external light sources that should also be able to affect the mesh.
Hi @carolhmj !
Apologies, I just realized i should have specified that it’s a medieval style torch
It has to be dynamic lighting, it can move around and the plan is to also cast shadows.
This is the progress right now (turning on & off the light) with unlit material while animating the intensity of the light together with material albedoColor (white to black)…
but it’s not very good
About (slightly before) 4/5 into the video you can clearly see the torch go completely black as it’s turned off before the unlit property is set to false and then the external light is applied
@aWeirdo, if you want to simulate the torch always being lit, you would want to be using emissive texture and emissive color like @Evgeni_Popov mentioned. While this isn’t a torch, this demo shows blending both lit and emissive color in the same material. When the emissive strength is set to 0, it still receives light from the rest of the scene, but when the emissive is set above 0, the emissive color renders as unaffected by the scene light. Using emissive also unlocks the potential to use the glow post process which is driven by emissive color. This example uses a node material, but you can get the same effect with StandardMaterial or PBRMaterial.
The thing to remember is that albedoColor should not change based on the level of emission on your torch. Leave albedoColor alone as it will render any light which hits it normally and your torch won’t disappear. Emissive color will be a separate texture with just the light that should be mixed in with the albedo to imply the light source is coming from the flame. If you are ramping value, do it with your emissive color, not albedo.
I believe this is what I did for the rear and front lights of my motorcycle demo.
Press kb 1 to 4 to change the light state (from off to full on, park or dip).
Search for node ‘lamp_f0’ and children to see the assembly (with a reflector, a bulb and a glass)
As guru patrick says, emissive is key and I’m actually ‘exploding’ the texture with a level of 2 for full lights. However, since this is a PBR (metallic) material, I’m also adding directIntensity, also going way above the value of 1 (30 on full lights if I remember correctly). Finally, to complete the effect on park or dip (half lights) I also pushed the albedo level a little (1.3 or 1.4).