I've recently added URP to my project. The problem I'm having is all the lights are way weaker than they used to be including area and spot. I am using a spot light as a flashlight for my character and the only way I can make it so the flashlight actually shows something is by turning up the intensity by a lot like a 1000 minimum and that casts a beam of light which is not nice because getting close to objects turns them white instead of actually showing them up like it used to I would like if someone knows what can I do about it
Changing the color space to linear instead of gamma under
"Edit>Project Settings>Player>Other Settings>Color Space>Gamma/Linear"
This worked for me in order to make it so moving close to objects wont make them in the color of the light.
Related
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?
I just started using URP in Unity for a game in progress. I'm doing a sort of sprites-in-3d thing, so I'm rendering some sprite sheets on quads. To do this, I create a Material with the sprite sheet and use tiling/offset to render the proper frame of animation by making a call like:
CombatMaterial?.SetTextureOffset("_BaseMap", new Vector2( (AnimationDefinitions[animationDefinition] % 16) * .0625f, CombatMaterial.mainTextureOffset.y));
I'm currently trying to add some feedback into my game for when characters use abilities or get hit by flickering the material. Because the base color starts at white and goes to black, that won't really work; the only other thing I seem to have available to me is emission, which looks great. Using a 0xAAAish color achieves the effect I'm looking for. I've been using the Feel Unity asset to do this, but I've also attempted using something like this:
CombatMaterial?.SetColor("_EmissionColor", Color.white);
The problem is, once I've set the _EmissionColor, the main texture offset no longer updates in game, thereby ruining all animations. If I change the texture offset manually through the inspector at runtime, animations don't work AND the _EmissionColor flickering stop working. If I mess around with the color of the _BaseMap in the inspector, _EmissionColor flickering starts working again.
Before I start diving into some unsightly color adjustments in an attempt to make this work again, I would love to know if I'm doing something that is simply unsupported by URP/Materials/whatever, or if there is some alternative to what I'm doing that's a little more straightforward.
Thank you!
After trying a bunch of random stuff, I don't have a "real" solution, but the game IS working how I want it to.
What worked for me was setting the _EmissionColor on the Material to (1,1,1). For some reason, when the _EmissionColor is set to (0,0,0) it's a black (ha) hole and won't accept future changes to the _EmissionColor. I assume this is some shader nonsense (with the base Lit Shader that URP uses) that I am clearly unfamiliar with.
Hopefully this helps anyone doing something as pointlessly against the grain as I am!
I've finally decided to start Unity. I have little to none experience with these kinds of stuff, and I'm currently facing a problem. When I import a 3d shape on unity, the default color is beige, even though it is set to white. When I try making a white texture and apply it to the object, it still turns out as beige.
This is due to lighting. Check the light source in your scene, it probably has a yellow-ish color, try to turn that back to white.
Depending on your render pipeline (Universal RP, HDRP...) you might even have something like global illumination with a slight color tint enabled. Try to check your lighting settings.
You can also always click on the material the object in question uses and in the little preview window you see it lit by a neutral light source, without your scene lighting settings.
also, you did not provide an image, which is why I can only help you so far given your message :)
This is probably a noob question, but I am playing with lightmaps in unity and I am finding that with baked lights and the same lighting settings (intensity etc) the scene looks much darker.
This means that for me to test how it will actually look realtime is not a good indicator and baking every time I change a color or increase light intensity would be an extremely time consuming process.
Is this normal? Is there a good workflow for this that someone can share?
I also have the issue of character which needs to have realtime lights. If I increase the light intensity to compensate for the above, the character appears very bright (as it's using realtime).
Hope this makes sense and somebody can help me out!
Cheers,
You need to think that Lightmapping is a pre setup of the scene in the same way you make any prefab or character with their textures and uvmap, the only difference is that you have prerender in the texture the light and shadows to skip realtime light and shadow calculations.
In addition, you can add some realtime lightning effect without modify your lightmapping and some GI to got your desire illumination in all scene including your characters.
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.