Hello!
I am having an issue with interpactors in my level, I am currently unable to light them properly from all angles.
As far as I know, dynamic objects can only have one light source.
This means that I can only light them from one angle. While I don't mind parts being in the shadows, the issue is that this makes all speculars and normal maps completely flat.
A large part of my level looks basically unlit because of this.
I am aware of light environments, however, light environments don't seem to effect speculars and normals. All it does is colour the object rather than making the shadows black, basically.
This is one of the assets in question:
With the lighting in the level coming from above, it looks roughly as expected.
However, from the sides, where a large part of the gameplay takes place, it looks like this:
This is absolutely horrible. (The objects on the sides are also interpactors, and thus look just as bad)
Any ideas?
Replies
Lightmap the meshes so the lighting is baked in. This is most seamless but doesn't work if the pieces animate in such way that it is obvious the lighting doesn't update. This would also be fastest for performance. You'd need to disable shadow casting on all interpactors for this.
Turn off light environment and light all interpactors out with dynamic lights to get accurate per pixel dynamic lighting. use light channels to have the dynamic lights only affect the interpactors (you'd want to keep it at the dynamic light channel actually for technical reasons, turn off the rest).
You can also apply an ambient color overlay and (I believe) change shadow color of light environments to help objects blend in more, though this require editing of the meshes in Notepad since Epic removed access to it via the properties. This can work quite well, The Ball is full of that trick and has all interpactors blend in ok because of it. I also almost always turn off shadow casting of interpactors due to the dynamic shadow almost never working as it should.
Wait, it's actually possible to light dynamic objects as if they were static meshes? Their animations aren't drastic, so any specular+normal lighting would do what I ask for aplenty.
How would you make them bake lighting like this? AFAIK, it dynamic meshes in UDK skips lightmass no matter what.
Go to the Light Channels in interpactor properties, turn on Static, turn off Dynamic.
Ensure mesh as lightmap uvs and resolution obviously.
You might want to disable shadow casting on it.
Rebuild.
I'm having a couple more issues though.
I have another dynamic object lit by a spotlightmovable, it needs to be dynamic as it's spawned with a random mesh each game start. The spotlight by itself lights the object how I want it, but the scene is mainly lit by a dominant pointlight, which seems to take priority before spotlight, making the lighting poor, like the above issue. I tried using lighting channels, setting the spotlight and the dynamic object to their own channel (Unnamed 1), but it doesn't seem to help. I also tried to disable the "accept dominant dynamic shadows", but it still doesn't seem to get lighted by spotlight. Any ideas about this?
I understand why the dominant light would do this, but I thought the closest dynamic light took priority?
The reason I am using a dominant rather than static lighting for the level (now that the above objects use static lighting rather than dynamic), is to light the characters properly.
Thanks again, I don't mean to undermine your help with more issues. :P
Dominant doesn't really mean dominant, it has a different way of rendering shadows. That is the main thing that it does differently, the name isn't very fitting.
The light with most intensity takes prio on dynamic meshes, not the one that is closest. Using light channels can indeed help.
Feel free to show some pics to clarify more what the problem is.
Sure.
The dominant pointlight is the brightest of the two I'm afraid.
As you can see, I have a spotlight lighting my dynamic mesh.
However, with the dominant pointless in the main part of the level, it turns out like this.
As soon as I remove pointlight it looks like this instead and gets lighted properly.
The light and the object is set to their own lighting channel, but it doesn't seem to have an effect.
Was lighting channels broken at one point? I am stuck with the March 2012 build.
Try to disable shadow cast on the mesh also.
Turn off Use Boolean Env Shading also on the mesh. Try Syntheize SHLight on.
I thought you were onto something here, since the problem area is beneath the level. So I just moved everything somewhere it wouldn't recieve shadows from my level, while it generally became brighter, it stilll appeared unlit (only light environment, no speculars and normals affected)
Hmm, fair enough.
I tried all of these, I'm afraid they make no difference, except the boolean obviously made the object brighter in general, but still "unlit", as in not recieving any lighting influence to the material.
After some testing, it would appear that the light channel only affects light environment, and the dominant light still has priority over the actual lighting.
This seems to be the case even if I make the spotlight brighter than the dominant light.
Edit: I think I have figured out a solution. It seems like movable and dominants (probably dynamic lights in general) like to fight about what's within eachothers radius. I moved the object out of the dominant light's radius, and it now lights properly again.