- Home /
Light Baking Issue
Before I have real-time lighting because of the performance issue, I decided to do light baking for my 3d game. So I have mark 3d environment as static because it remains on screen always without movement.
Also changed direction light mode to Mixed because I have few moving game objects too. But after the baking process gets completed, I got this kind of output:
In above, you can see in the above image what happened with my environment after baking. In the above image, I have also included light settings if you need it.
Ya, I’ve had mixed results with lightmaps in unity. I personally create a second UV $$anonymous$$ap on my models in blender and I bake the lighting in blender. I manually edit the light map itself to suit my needs and then I import it to unity. I got better results with one 1024x1024 lightmap from blender vs four or five 1024x1024 lightmaps in unity.
So within designing software, you are doing light baking and then imported 3d models into Unity? Also, I was using 3DS $$anonymous$$ax for designing models, can it able to do light baking too?
Yes exactly. I just put the whole scene in blender. I make the lighting the exact same if there will be any real-time lighting or the use of light probes in unity and I bake the lighting onto a texture which is layered on top of the original texture via a 2nd UV $$anonymous$$ap. I then import the model and textures. To apply the manually made lightmap, you can do so with the material’s shader by just adding an additional texture property in the shader or you can add it to the unity’s lightmapping system through a script. I’m sure you can bake lighting to a texture with 3DS $$anonymous$$ax as it is a pretty standard feature for a 3D modelling tool to have I’m sure there are tutorials on how to do so with $$anonymous$$ax.
Answer by siddharth3322 · Mar 15, 2019 at 08:55 AM
You have to enable lightmap UVs in your 3d imported model file.
I got this reply from one forum member so exact wording, I am posting here:
Yes that is what you should do if you bake lightmaps in unity, otherwise it will use your existing UV map and if that is already being used for your texture and you have multiple faces using the same part of the texture, you may get strange shadows and light where it shouldn’t be, etc. but I have had mixed results regardless if I choose to generate lightmaps and the lightmaps are unnecessarily large in unity in comparison to what you can do in 3D modelling software. I got 5 times better results with blender
Before I have AP$$anonymous$$ size of 23mb with the whole game, but after light baking only 2 environments/scene, it's reached at 69mb. Still, 3rd environment remaining to bake.
What do you suggest this? Directly I import models with shadows from 3Ds max?
Up to you, just saying that if you want to get the size down with the same or possibly better results, you can make a second UV map in your modelling program of choice. Then you can bake the lighting onto a new texture. In my last scene in unity after a fairly standard to low quality bake, I had 4-5 textures of 1024 x 1024. I was able to get better results in blender with only 1 texture of 1024x1024. That’s huge savings.. So I just imported that texture and the model with its second set of UVs into unity. The results are great. I can’t speak for 3DS $$anonymous$$ax as I’ve never used it, but you can surely get good results from a bake with it. Just thought I’d share from my experience. If your game works fine and you’re happy with your build size, don’t worry about it. I just like optimizing
Your answer
Follow this Question
Related Questions
The wall turn completly dark when not facing light. 2 Answers
Low Poly Light Leak 1 Answer
Light Baking - Runtime Placed GameObject 0 Answers
Unity 5 Lighting Problems 1 Answer
What am i doing wrong with Lighting? 1 Answer