Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
hello, when you rotate an object and bake the lighting, the lighting on those rotated objects can sometimes look strange; however, for objects with a rotation of 0.0, 0.0, 0.0, the lighting appears normal. how to reproduce: create a new scene, create some cubes and a plane mesh (ground), rotate one of the cubes, bake the light. note: sometimes when you rotate the object the bug doesnt occur. it happens with imported objects/prefabs too. |
||||
|
I have had this happen to me before, mostly on imported mesh. But 1 of 2 things are probably going on. 1 Normals got messed up, so freeze scale normalize normals might fix. 2 the cube faces are using onetexture blend ( its lit by a vertex colors and then blended with the diffuse) cc does this on low res parts to save some lumel space . Try clearing its vertex colors before recalculating lightmaps. Or maybe increase the lightmap lumel resolution. , lower is higher default is 1000. Not the texture resolution of 512x512 ( default) Maybe one of those 2 things will help Could just be something going on , but nothing i can really think of.. Sam. |
||||
|
i tried a few things, but they didnt work, im going to try to come up with a workaround for this, maybe mixing dynamic objects with static ones, thanks for the response btw. |
||||
|
Yep, had that exact issue long ago. You can solve this by making a plugin that would freeze rotation. I could provide that plugin I used (don't even remember if I made it myself or was it provided to me by someone), but, sadly, I lost it. Here's the algorithm of how it worked: 1. Get selected scene node; 2. Get vertex count; 3. Rotate each vertex position (search 'Rotation matrixes' or something like that); 4. Update bounding box; 5. Set rotation of the node to (0, 0, 0). I believe this happens because engine's lightmap generator uses vertex positions, while ignoring the rotation. If you place a cube and rotate it, and then try to check any of the vertex positions, it'll be same as if it wasn't rotated. But, yet again, that's my assumption. |
||||
|
Hey dekon, I saw your stuff while surfing through the older coppercube forums, are you still making your game? It looks cool |
||||
|
i discovered something... first, rotate the object then create a cube and delete its vertices and finally merge the empty object with the rotated object it worked for me |
||||
|
|