View Full Version : Odd lighting in UDK
12-02-2010, 10:23 AM
Hi, I have created rock face material for a UDK scene and then rotated the material by 90 degrees each time on 4 assets to create some variation, the problem is that I get the following result, the lighting seems to rotate with the model. There is one dominant directional light lighting the scene. Any ideas its driving me nuts!
12-02-2010, 10:37 AM
I'm not quite sure I totally understand what you're saying. I think it's normal though. UDK bakes lighting onto the model So when you turn the model, the lighting stays the same until you bake it again.
12-02-2010, 10:47 AM
Sorry, I should have been clearer, its four separate models all with the same material, not one model rotated (but one model rotated should still work shouldn't it as the lighting is baked onto each model individually?!!)
12-02-2010, 01:51 PM
how did you rotate the material? New model with new UVs or just rotate the normal map in the material? The 2nd option will not work
12-02-2010, 02:16 PM
Ohhh! Now I get what he means. Yeah, if the normal map was rotated, that may just be what is going wrong.
12-02-2010, 03:58 PM
Its rotated in the model, not the material. I created a base mesh and sculpted that then used that base mesh to create four different models with four different rotations.
12-02-2010, 06:50 PM
So you're rotating the UVs on the low poly model and you have 4 separate Low poly models in UDK?? Could you post your normal map?
12-02-2010, 07:13 PM
Odd. Did you flip your uvs instead of rotating?
12-04-2010, 10:46 AM
I have reset xforms in the max models which seems to have corrected the major lighting issues I was having but I am still having issues with the normals in the second and fourth models. I have put numbers on the diffuse so you can see how the material is applied to the uvs of each model. The normals don't seem to like being rotated by 90 degrees or 270 degrees. Any ideas why this is? As you can see the wall on the far right has very flat looking normals and looks rubbish in game.
12-07-2010, 02:28 AM
Any ideas on this, I've added larger images so it should be clearer.
Also can a mod move this thread to the UDK section as it really belongs there.
12-07-2010, 05:48 AM
So you're rotating the UVs? not the mesh?
Due to the way tangent space normal maps work, you cannot just rotate them.
You'd need to do some channel swapping and inverting for 90° 180° and 270° rotations see these photoshop actions (http://www.polycount.com/forum/showpost.php?p=579296&postcount=1). from this thread (http://www.polycount.com/forum/showthread.php?t=38892).
For anything other than that you'd need to recalculate the normal information with something like this tool (http://www.polycount.com/forum/showpost.php?p=965355&postcount=25) made by Ryan Clark (http://www.polycount.com/forum/member.php?u=14005) from this thread (http://www.polycount.com/forum/showthread.php?t=63944).
Hmm... looks like the link to the photoshop actions is broken, they used to be in the wiki as well but I can't seem to locate them, at least the relevant info is still in the post. Sorry...
This section (http://wiki.polycount.com/NormalMap?highlight=%28%5CbCategoryTexturing%5Cb%2 9#RGB_Channels) of the wiki may help explain it a bit better.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.