Black foliage after building lighting.I have downloaded trees asset from Unreal Marketplace and used it in my project using Foliage tool.But the problem is after building the lights the foliage becomes black.How to solve this problem.
It's a lightmap issue.
You can either:
A) In your StaticMesh window set LightMap coordinate index to 1 and LightMap resolution to 64. If it already is set and mesh is still too dark, and in case of trees it most likely will be, you should:
B) Just set that mesh to "Stationary".
Related
Edit
I figured out a tempoary fix for my initial question "how to disable this weird fog": Disable the fog in the lighting pannel (genius, right ?)
However, since I might need fog later, and it does not behave as I would expect, I still need to fix this issue.
Note: This only happens with exponential fog modes, not with linear.
I'm having issues with unity's universal render pipeline: A light grey fog, whose strength depends on the camera heading (see video)
(see how the plane geometry affects the fog)
The steps to reproduce are very simple (or just download the project here):
Create a universal render pipeline project
Delete the "example assets" from the scene
Create a floor with a quad (create quad, rotate, scale)
Create a new material
Shader: URP / unlit
Base map: black
That's it.
Rotate around, see how the "unlit" plane is actually affected by a fog whose strength depends on the heading of the camera
Rotating the quad has the same effect as rotating the camera.
Rotating the directionnal light has no effect (except on the skybox)
Removing the Directionnal light has no effect (except on the skybox)
Removing the Post processing volume makes the "fog" stronger in all directions so the camera heading effect is less noticeable but still there
This happens in game mode as well as in the editor
Getting close to the ground makes the fog lighter
the camera position has an impact as well (this is more visible when testing with a plane rather than a quad)
system info:
tested on unity versions: 2019.4.18f1, 2019.4.20f1 (LTS), 2020.2.1f1
Windows 10 Home 19042.804
Is it possible this is a bug in the URP/unlit shader ?
Thanks for any help!
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
The Problem:
I have a pixel-art based project that uses tilemaps and etc. Previously with just the default material Sprites/Default, I have this "Pixel Snap" option:
However, ever since I upgraded to LWRP/URP; and used 2D Lights (my game has a day/night cycle); all of the sprites have to be upgraded to a new Sprite-Lit-Default material which allows my sprites to be affected by the 2D Lights. The only problem I noticed in this new material is that it hasn't got any "Pixel Snap" option:
And after I used this new material, I notice some of my sprites (specifically the ones on the Tilemaps) tear. It's not game breaking and it occurs sometimes, but it's really quite annoying (and let's face it, it looks bad for your game to have that bug).
I haven't noticed this tearing bug on my other sprites (player, trees, obstacles, etc) only particularly on the tilemaps.
What I've Done So Far:
My sprites are set to Point (no filter), and Compression is set to None. On my tile sprites, there are no transparent edges etc. Even if I use Unity's Pixel Perfect Camera, the problem is still there.
Duplicated my tilemaps and offset the other ones to -0.01 or -0.02 on its X axis (so just in case it would tear, the player would still see the same tilemap).
None of these things have fixed the problem so far.
Are there any ways to bypass/fix this issue?
Thanks a lot!
What Solved My Problem
I placed the tilemap sprites on a sprite atlas, set the filter to Point, set the compression to None, left everything else by default, and then clicked "Pack Preview".
I have a model with 3 elements, each one has a different texture, when in real time everything looks awesome (both in designed and playing) but if I go and bake my lights I get the ugly mess you can see in the bottom part of the picture.
I'm pretty new to blender/unity. The game is aimed to android phones (google cardboard)
BAKED GI true
Using: Blender 2.7
Unity 5
Backed resolution 1 (increasing doesnt help)
Baked padding 2
Compressed true
Indirect Resolution 2
Ambient occlusion 0
I don't even know what parameters are really helpful here. Can someone help?
Setting Generate Lightmap in the importsettings should solve the problem.
i'm applying a shader on a plane, it helps me cast shadow on a transparent planes (it makes the plane to be transparent as well).
the problem is that it is working in the scene mode and in the game mode as well when i am playing.
when i make a standalone version of it the effect is gone.
i set Edit -> Project Settings -> Graphics to include the shader.
and i also placed the shader in the resources folder.
what am i missing?
thanks!
link to the shader
SOLVED!
problem was that this shader requires a GPU and the laptop i used doesn't have.