How to fix Unity baking weird artifact on emission material? - unity3d

I bake the scene with different settings, and this part could not get smoother, I tried
increase lightmap resolution, sampling, but still same result.

Related

Unity 3D - Baked light is too dark

So I am baking Subtractive light in my VR build.
I have the models set to static, generated UV's for all of them and played a lot with the lighting settings.
The problem is that the sigle baked directional light looks too dark and "burnt" after baking.
How can I keep the brightness of the pre-baked scene after baking?
Posting images of before/after baking and settings below:
To increase the brightness of shadow you can change "Intensity" parameter in your directional light settings.
This "burnt" effect looks kinda pixelated so to fix this you could in your lightmapping settings increace lightmap resolution or lightmap size. If it didn't help, you could increase "scale in lightmap" in mesh renderer.
Another option is to create a copy of your directional light so that you have two directional lights in your scene. Then assign one light mode to 'Realtime' and adjust the intensity to get the scene brightness looking the way you want and assign the other light mode to 'Baked' and change the intensity to get the baked shadows looking better.
Baked light should always be the same (or better) brightness under direct lighting conditions.
There can be a multitude of issues in your scene, and why it's giving you this effect.
Please check the following in this order:
Does your models have proper UV maps
Does your models have enough scale in lightmap (small lightmaps can create faulty shadow effects)
Does your scene has enough reflection probes for indirect lighting (not enough light from the shadowed side can "shadow" the lit side.
Do you have ambient occlusion enabled? Maybe you need to fiddle with the values there.
From experience "Baked Indirect" gives better results than "Subtractive"
Are your settings in URP or HRDP or LRP are correct?
Is your "Sun" the right brightness?
What you should expect with "good settings"
Example lighting settings that the result above were achieved:
Change Direct Samples to 32, Indirect samples to 512, Environment size to 256, and change lightmap size from 512 to 1040. Make sure also that any emission materials are changed from Realtime to Baked along with of course having such objects set to static. That should take care of some of the lighting and illumination issues. Also double check that these materials are all checked for GPU instancing.
Since you are using Directional Light, Try adding a Bakery Skylight into your scene. That fixed the burnt shadows problem for me after baking. Shadows are more lighter now.

Unity light breaking in build version

So in unity you can bake lights and you have to make the gameobjects static so they get a lightmap
So I did made my objects static and bake the scene light.
The result in the editor and in editor play
this is what I want
But when I build the game I get this
there is no light at all or its just spread all around the floor
The floor gameobjects are just primitives with a texture
I tried to reacreate the bug by placing some gameobjects and lights in a new scene
in both editor and build there was no problem
I used the default camera to make sure its not a issue with the camera on the play but no matter what I do it has the same effect on the previous scene.
I tried making the direct samples bigger inderect samples bigger and enviroment samples bigger
also the lightmap size bigger but nothing works.
LightMap Settings
Quality Settings
Okay so they way to fix this is go to
Edit > Project settings > Player
go to other settings and disable lightmap streaming
You need to disable it because huge maps like mine generate a lot of lightmaps and streaming all of them in runtime is really slow and so the lightmaps is really low res

Unity realtime GI - baking causes odd shadows

I am using realtime lighting with baked GI.
I have tried resolutions between 1-20 for these rocks, I've tried chaning UV distance, angle and lightmap scale. Nothing seems to fix these weird shadows. Does anyone know what is causing it? It only occus on about 1% of objects.
It is the result of ambient occlusion - deactivate PostProcessing to see if your baked shadows look fine.

Unity baked lighting blotchy and cubic

I've set every object in my scene to 'static' and the bake runs automatically, but the result is unusable: blotchy, blurred cubic lighting...
Here are my lighting settings:
What am I doing wrong? I've tried changing the atlas size, the 'scale in lightmap' of the house object and various other settings, but can't seem to make the bake behave.
Any ideas much appreciated.
You might want to check the see how far from 0 the mesh is. I Had mine about -6000(y) and it had extremely blotchy/spotty lightmap results. I moved it much closer to 0(like -10y), re-baked and everything was fixed.
It looks like UV overlap. For issues like this where some sections are bright white, red, or green (where they really shouldn't be), try
increasing the lightmap padding
toggling stitch seems on the render (mesh renderer or whatever it is for the object with white patches)
Play around with the other lighting settings
rebuild the UVs (A lot of forums will end with this, it can be quite manual. Luckily 1- 3 has always worked for me so far)

Unity3D: Why is particle lighting making directional shadows disappear?

UPDATE: As #BenHayward suspected, this is a bug. <link>
I have a very simple setup of cubes on a plane comprising a grid of quads. A directional light is shining down at the scene at an angle, producing a set of shadows from the cubes onto the quads.
Now I'm trying to produce an explosion effect with Unity's particle system, but when I add a point light to the particle system it causes all the directional-lighting shadows to disappear, whether they're in line of sight of the particle or not.
The shadows reappear when the particle is destroyed. Replicating the particle effect with pure C# doesn't cause any problems.
(Oh, and obviously I'm using the deferred rendering path.)
Any ideas? This is driving me off the wall.
[EDIT: I should have mentioned that the point light added to the particle system is set to cast shadows. The Unity standard particle pack has shadow-casting disabled by default. They too cause the problem when I turn the shadow-casting on.]
Based on the project that you linked to, it seems as though the particle system is causing the shadow cast from the directional light to flicker on and off quickly. I suspect this is a bug, since if it were intended behaviour, I wouldn't expect it to flicker in this manner.
In cases where this is not a bug, the problem can be caused by a couple of issues:
You can only have a certain number of dynamic (shadow casting) lights in your scene which are seen by the camera frustum. By default, this number is quite low (I think it's 4). You can increase this number by going to Edit > Project Settings > Quality. Set the Pixel Light count higher from its default value. You will need to increase this value to be greater than the total number of lights in your effect. Higher values will allow more lights to be rendered on the screen, but this reduces performance.
It depends on the shaders which you are using to receive the shadows. Some shaders will only render shadows for one directional light. The light which is used isn't necessarily too easy to determine. If you are using the standard Unity shader this shouldn't be a problem. But if you are using a mobile compatible surface shader or something you've written yourself then this could be the cause of the problem.
Also, for an explosion, I'd recommend using just one single point light (not lights attached to each particle), as this is all that is required. Any more lights would result in considerable performance impact on the GPU especially if there are more than one explosion in the scene at any one time.
I recreated the scene as you described, i can't recreate your issue.
i mostly followed this tutorial, and added a few cubes in a plane:
https://unity3d.com/learn/tutorials/topics/graphics/adding-lighting-particles
I will need a screenshot of your lights componnents, both the directional and the point light, the particles, and the cubes (mostly the material); I cannot comment because i dont have enough reputation yet, so i'll delete this once you add the screenshots;