Unity baked lighting blotchy and cubic - unity3d

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)

Related

HDRP Decal material with "Affect normal" turned on looks almost completely white from sheer reflectivity

DESCRIPTION
I just started using decals. I game a GameObject with a "HDRP Decal Projector" component. Whenever my character is shot, I just instantiate this decal at the hit point and use Quaternion.LookRotation(hitPoint.normal) to rotate it into the correct position. Other than that, I am using pretty much default HDRP settings. I am not sure if it's relevant but I am using a Cube Map with a HDRI Sky.
PROBLEM
Unfortunately, when I have "Affect normal" turned on, my decal looks completely white from the majority of angles. It seems it is reflecting a lot of light. Here it is with it turned on:
And here it is with it turned off, which is much closer to what I wanted but, unfortunately, it completely loses its 3D appearance, which is very important:
WHAT I TRIED
I went on Photoshop and tried reducing the intensity of the Normal Map by blending the texture with the color (R127, G127, B255) but it didn't work. The 3D effect became less pronounced as expected but the whiteness/reflection remained the exact same. I fiddled with all of the settings that I thought could be related and nothing made any difference.
NORMAL MAP SETTINGS
MATERIAL SETTINGS
DECAL PROJECTOR SETTINGS
NORMAL MAP ITSELF
Here is the Normal Map image itself. It is tiny since it's only a decal:
What am I doing wrong? Is this caused by a general HDRP setting of some kind?

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.

Textures get a pink hue but only when displayed far away, or at some angle

Here's a video showing my issue: https://www.youtube.com/watch?v=M4a1tQUn0HA
I'm using the URP pipeline
No fog
No antialiasing. I had it turned on previously, and when I got really close to my cubes, I could see what seemed like a 1px gap between the textures, with some purple. But when I turned off antialiasing, it disappeared. https://i.stack.imgur.com/erlM8.jpg
Any idea on what to tweak to fix that? If you need a screenshot of any of my settings, let me know.
This is a MipMap Bleeding issue, this usually happens in atlassed textures, when the textures in the atlas are too close to each other thus creating mipmap artefacts. This issue is usually sorted by adding some padding/dilation when creating an atlass.

How can I use baked lighting on sprites? / How to light up a large area in 2D?

I'm having trouble figuring out how to light up large area(s) of sprites in Unity 2D. My previous knowledge on Unity's lighting is zero.
I first tried using a large amount of point lights and using the "Sprites/Diffuse" material, but about only five would actually render at a time, so I guess there's a limit on that.
Then I tried putting in an area light. That didn't do anything, so that's when I started doing research about baked lighting on sprites (and baked lighting in general). I found stuff like this but I couldn't get it to work either because it's outdated or because I don't know what I'm doing. Other answers I've come across seem to assume that the reader knows anything about lighting in Unity in the first place which, to be honest, I don't. Unity's documentation website had some information on it, but no tutorials that go into how to set up baked lighting.
I've tried a bunch of different combinations of materials (like using the "Standard" shader for the sprites instead of "Sprites/Diffuse", emission, ect.) and I enabled "Baked Global Illumination" in Lighting>Settings.
If baked lighting isn't possible on sprites (or isn't worth the trouble), what are the alternatives?
Edit: I made sure not to have the lights pointing the wrong direction, and I do realise that Unity2D is just like painting onto a piece of paper in Unity3D. I was able to get point lights to work, but only a few at a time. I don't need to do the entire screen at once, I need to do a large specific area at once.
some tips...
working with sprites your in 2d... when you add a light, switch to 3d mode, and rotate to make sure your light is pointed at your objects, and oriented so as not to be on the same plane, or level with them, as this will cast all the light behind them.
if your trying to light up everything on the screen(in camera) attach an area light to the camera at the cameras position, point it where the camera points, and then in the inspector on the right, you can change its variables. intensity, range, width, height etc.
Emissive Texture:
https://www.youtube.com/watch?v=oa6kW5HhRd4
For some reason, I never even thought about going into the asset store. I found this for free, and it looks like it will work: Light2D.

Texture doesn't look the same

I am new to Unity and having problems with the textures. Whenever I import a texture and apply it to the terrain it doesn't look the same, sometimes it's for example way too dark and sometimes it's way too shiny. Here is an example:
I have been googling for a while without finding much about it, does someone know what is causing this and how I can fix it?
The reason for this, I expect, is because you are just dropping a texture image onto an object without changing anything. By default, this will create a new material asset, which is what is actually added to the object.
Look up Materials if you don't already understand how they work. The default settings are the Metallic slider at 0 and the Shininess slider at 0.5. Obviously these settings need to be changed depending on the texture, as not every texture is going be a non-metallic, kind of shiny substance.
It is also in these settings that you can add things like Normal Maps, Bump Maps, etc, to make them look more realistic.
Reasons for it being too dark might simply be that the your lighting isn't reaching that particular surface. In order to have a global light source, add a Directional Light to your scene.