Requesting help with lighting

Hey guys,

Working on this personal project with dynamic shaders and I was hopping I could get some help with lighting both in general and some specific issues.

The project was baked on medium quality not production, I am not sure how many of the problems will be fixed with this. Also most light-map resolutions are set to 128x128.

https://s29.postimg.org/6xvu5vltj/Indirect_Lighting_Issue.png

Also I want to create a small trailer at the end of the project. I have tried this before with matinee however I could not render it and wasted a lot of time with this what would be the best way to do this?

Thanks in advance!

Make sure you are using a light mass importance volume and are baking on production. Many of those errors could be related to not baking on production settings.

Thanks, yes I do have the importance volume and I hope the production quality will help.

Do you have any input in general? I would really love some critique if it is not too much to ask

You can read about that issue here: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

Hi, I really like art direction you’re going for here, it’s very clean and your visual language is very cohesive, I can clearly see a well planned theme with the environment as a whole- great job!

I’ll try to help you out as much as I can!

Light artifacts: (caused by baked lightmapping)
There are many reasons you get lighting artifacts like what you’re getting. The biggest problem I see here appears to be lightmap related. Make sure that your lightmap UVs on each static mesh is good. This is a really big topic, so I won’t go into detail. There’s some helpful info you can find with a Google search (surprisingly there isn’t as much “good” info on the topic as there should be); I’ve even made tutorials about it myself. Make sure your lightmap UVs are non-overlapping, they can stretch so don’t worry about some stretching here and there. Also make sure that your lightmap UVs aren’t fragmented, they should be as few shells as possible and as continuous as possible. The more splits you have, the more artifacts like these will be present when you bake lighting.
Also, when in Unreal Editor, hit the shortcut “Alt+0”- this will activate lightmapping view and allow you to see where your lightmap resolution is too low or too high. I often see a common mistake posted over and over on the forums; that you should crank up your lightmap resolution high and higher to remove these artifacts, by for example, changing all your static meshes to a resolution of 512, 1024, etc.- this is incorrect and you shouldn’t do this. Doing this will not fix the issue, just makes it less visible, and increases your build time through the roof- while also eating up your entire memory budget. Use that lightmap debug view to see where you’re going wrong/right with your lightmap resolution on your entire level. Try to keep your lightmaps in the green as much as possible; if you see blue then those objects have too little resolution- if you see red, then you’re cranking your resolution too high and need to pull it back.

Lightmass:
understanding and having a deep technical knowledge of lightmapping and offline biased rendering will help understand why you get lots of lightmapping artifacts. Lightmass is an offline renderer that uses a lot of the same math and algorithms to mimic real world lighting that other industry standard renderers use, such as VRay, mental ray, etc. I will admit that there is very little information on Lightmass out there; the best source of info is the engine source code, but you already have to have an advanced knowledge on the topic to understand what you’re seeing in the header file in the first place. The default settings, I’ve found, are not setup to give the best results that Lightmass is capable of and I hope this is changed in the future. There are also some settings not exposed to Unreal Editor’s UI that probably should be, making even more difficult for most people to get “perfect” renders. I suggest you (only after fixing the lightmap UV problems on your static meshes) try turning down your “Static Lighting Level Scale”, and turn up your “Indirect Lighting Quality”, This alone will give you improved results; it’s really about tuning Lightmass correctly for your specific environment. I use different settings for every environment I work on- it’s the same concept when working on visualizations with something like VRay or mental ray; your render settings will be different for each job/project.

Shadow Distance Artifacts:
Based on the screen shot I saw you posted, looks like this is an easy one. Looks like your directional light’s cascade shadow map distance is too short. I find that it’s very short by default, so you may want to crank that up until it works best for your environment. Again, this is one of those things that you’ll need to adjust on a per environment/project level.

Anyways, hope all that technical mumbo jumbo helps, your stuff is looking great and can’t wait to see a quality lighting pass completed on this environment!

Wow thanks mate! This has already helped a lot.
I pressed alt+0 and half my project became red so I will have to scale some down.
I am happy to say that each of my objects has a “solid” color so I wont be needing to fix any uv’s (even though a lot of them are automatically made by Unreal)

I will have to look into light-mass tomorrow

Thanks again man!

Great, glad all that text is helping lol

I would say, using auto unwrapping in UE4 is a bad idea. A lot of people (even within the games industry) get lazy and use auto mapping in programs like Maya, UE4, etc. This is bad practice and should be avoided, else you will get really bad lightmapping in your game. The best approach is to unwrap meshes by hand (in Maya, etc.) by laying out UVs that are as continuous as possible, keeping shells to a minimum, and hiding seams in areas of a mesh that players are unlikely to see (i.e. underneath or behind the mesh or in areas where materials change, etc.) It really is an art to layout good lightmap UVs, so far artists layout the best lightmap UVs, procedural tools like Maya’s auto unwrap can’t beat a veteran game artist. Now that said, laying out lightmap UVs is seen as a tedious and annoying task, no one in the studio looks forward to it. So thankfully there are some tools that make the job easier and faster, in some cases you can get lucky and it’s effortless. Tools that can make it easier are ones like Headus UV Layout and ZBrush’s UV Master tool. I also recommend (one of my personal favorites), Ninja Dojo- it’s a plugin for Maya that adds a ton of useful features that should have been included in Maya to begin with.

Hey jak,

I have fixed most of the problems i.e. the dark lines, shadows disappearing, general quality. I am however still stuck with some meshes getting lit differently (see image)

Now the ceiling is made out of tiles so it is not one solid mesh I know it will probably be fixed by making it one solid mesh but it is also happening less apparent in other places. I also cranked up my directional light’s indirect strength to 8

Do you know of a way to fix this?

https://s24.postimg.org/53kgqsm6t/Indirect_Lighting_Issue_02.png

It’s a frequent issue with lightmass. Unfortunately there’s no simple solution or single solution. There’s no way I could sum up the problems and solutions in one post, but there’s some good threads on that issue.

Thanks Zac! the second thread seams to be very interesting and might help.

It’s been a while since I worked with matinee, but a short while back I rendered out a trailer with it by just dumping each frame of my matinee to a jpeg and used ffmpeg to put them together into a video file. Then I edited in music/sounds using an external video editor.

The other settings, avi and png iirc(?) just wouldn’t work properly no matter what I tried, but unless it’s crucial that you record sound directly from the game you could give that a shot. Also this was a few months back, and I think we’re all supposed to use level sequencer now for this? vOv.

I strongly recommend switching over to the newer, more modern Sequencer. It’s much more powerful, easier to use, and has way more features to support modern video production workflows.