2 Questions about lighting

Ive started lighting my game and i have 2 questions about lighting

  1. My level is a big cavern with one hole in the roof where some moonlight will come in. In the cavern there is a town and a couple of other light sources.I think in order to light
    it i will have to use lots of point and spotlights. As it is a level that should have alot of contrast, many very dark areas and
    some light areas. Is there a limit to how many lights i can use if they are all static, do they make the rendering of the level more costly in any way?

  2. For the characters i have already painted in specular highlights and shadows into the texture so i would like to them to be default light so i can use only static lights in the level, is that possible?

  1. Static lights do not cost extra rendering time. Depending on your level layout, the baked lighting may take a little more texture memory, but that is usually not an issue.
  2. I’d advice NOT painting in specular highlights and shadows (other than ambient occlusion) since this will look wrong in a PBR engine such as Unreal Engine.
    When you bake ligthing, UE also calculates a lower res field of light information that is used to light movable objects, such as characters.

Just a note though, adding more static lights will increase the amount of time it takes to build/bake the lighting, but after that point they will not affect performance.

Thank you for the replies! :slight_smile:

  1. There is no limit to number of static lights. But it might take a while to load a lot of lightmaps on a normal not so high end system if you end up adding way too many static lights in your level.
  2. For Characters i would suggest to use some stationary lights for lighting your town so your characters will also react to them in a good way. And Volumetric Lightmap will take care of the indirect lighting on your Character.
    Looking forward to see the scene you create if you post it here…

Thx :slight_smile: This is how the levels looks right now. But i still have alot of work to do on the lighting. I will post pictures of it when its finished to get some feedback. One thing i havent managed to do yet is i want the purple crystals to look like they are glowing from thew inside. But when i do that the details on the texture arent visible anymore since the material gets to bright. Same thing happened when i tried to make the windows emitt light. Once its bright enough te be visible on other surfaces the windows are way to bright and the textures on them are no longer visible :confused:

Looks lovely. Some tips:

Are you trying to increase the value of baseColor to make things glow? That won’t work, basecolor is clampet to 1 and it will only wash out your textures.

To make your crystals and lava glowy, their materials need to output some color in the Emissive material pin. Whatever you plug there is added to the frame buffer on top of the lighting. Make sure to multiply the output by some value greater than 1 (5, for example), so it emits strong enough values to trigger glow.

Also, since you are using static lighting, you can make your emissive static meshes actually inject light into the lightmaps. Select them in your scene and look for a flag that says “Use emissive for static lighting”.

Finally, if you want to get some specular highlights from your static lights you need to add some reflection capture probes. They capture the surrounding environment into a 360 degree texture and apply them as reflection sources onto nearby surfaces. Try adding a big one in front of that lava waterfall and see for yourself.

Hi, sorry for the late reply. Have taken a few days off from working on the game.I have been using the emissive pin. I tried making a different version of the texture on the crystals that has alot more contrast wich looks alot better as the texture is more visible now as i am incresing the glow. I has no idea about the reflection capture probes, i will look into them. Thank you!
I did notice somethin worrying tho about my scene. It looks MUCH darker on some screens. I guess i will have to make on of those adjust gamma things when the game is started.
Maybe the forum could get me some feedback so i will get an idea how different it looks on different screens. On my macbook screen the rocks in the bottom right corner of the top image look almost pitch black, but on the computer i work on it looks much better.

Macbook screens are factory-calibrated, I guess, so your PC monitor might not be well calibrated and that could be why you get such different results.

It could also be due to automatic quality adjustment. By default, lowering the post processing quality disables the automatic eye exposure, so if you have values on min/max brightness that are too far from 1.0 your scene will look weird. If this is the case, I suggest you first set the min/max values to 1.0 then adjust the exposure offset to a value that looks correct first (this will work on all quality levels), then you tweak min/max values to add exposure variation if you want (or not, depending on your game).