Unity real time soft shadow - unity3d

Trying to implement real time smooth soft shadow(see image1) in unity. But default unity shadows seems like not smooth (see image 2). I am new in unity shadow. So is there any other special settings or shader should apply to achieve real time soft shadow like the image1?
Any suggestion, or good example or tutorial?

You need to change the quality settings (edit -> project settings -> quality).

Related

Unity bloom effect not working (cinemachine, URP)

I've been working on a fairly large project in Unity. Until recently, we weren't using universal render pipeline (URP) and made that change. When we did, all the bloom effect we already had in place to create a neon glow look for our game disappeared, and everything looks opaque. All the tutorials I found say that it's fairly simple to add this effect, but I can't make it work. I'm starting to get suspicious of the Cinemachine in the main camera, since it's brought us problems in the past. I'll just state some of the things I've tried:
The post processing checkbox is ticked in the camera view.
My materials have emission turned on with colors that used to work before URP.
The camera has the volume component, with an override of bloom and the values of intensity and threshold super high.
I've also dropped a global Volume in the scene with a volume component with bloom effect (one solution suggested I do that)
I think that's everything. Please let me know of any suggestions!

Unity URP Material scripting

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!

Unity 3D 2D Imported Sprites Pixelated

I have this image generated thanks to PowerPoint:
We can see here, the image is not pixelated.
But when I import this in Unity 3D, the result is:
Here you can see the sprite's parameters:
Am I using the correct tool for my sprite creation? (PowerPoint)
If the answer is "No", which tool can I use for avoid this kind of problem?
If the answer is "Yes", how can I avoid this pixelization of my sprite in Unity 3D?
Thanks a lot for your help!
PowerPoint is not the best image editor :D But your sprite looks correct, possible you just set small scale in Unity Scene window for it.
Try increasing your sprite Scale in Scene window. Select it, next in Inspector increase X Y Z Scale parameters in Transform component (it should be on top).
I just tried your image in my Unity editor and it seems fine. Make sure your Sprite Renderer transform scale is set to (1,1,1). For me even that seems not to affect the quality but it is a best practice not to have different distorted scales for everything in your scene.
One tip for improving your sprite quality is to export it in a POT resolution. Meaning that the resolution of the image should be divisible with 4. This way Unity will be able to compress the image with a much higher precision and quality. One resolution example of that is 800x800 or 1920x1080 etc.
Make sure your build target is set to Standalone and not other platform. If you are set to Android for example. check the Android specific compression in your sprite import inspector. That might also affect the quality.
To answer your question on what image editor to use, the best one, in my opinion, is Adobe Photoshop. If you don't want to pay for it, just search for any free image editing tool. But stop using PP, I'm not exactly sure how you have come up with that.

Is it possible to get good shadows in Unity 3D?

guys!
I want to use Unity 3d for the AR project, for this, I need good shadows for the small objects. But when I start HDRP project and look at the demo scene I see terrible shadows... So the question is - is it really possible to get good shadows in Unity doing some adjustments or this the top what I may get? If it's possible, could someone point me out where to read how to set up good shadows for the small objects in Unity?
Mulitple factors comes when talking about shadows, such as general game quality settings, antialiasing, light settings, Normal Bias, occlusion, and more. You can change thoses settings in Unity editor directly.
You should check:
Edit > Project Settings
Ligh inspector settings (hard or soft shadows)
Window > Rendering > Lighting Settings
You can kind of "play" with settings and see where you go, you can get good shadows for small objects in Unity3D. Don't forget that some settings could be very consuming depending on your hardware (you are doing AR so mobile), just keep in mind.
Good luck !

Unity 3D Vs 3DS Max Default Models Colors Variance

I was getting 3d models color difference in 3DS Max (My 3d models designing software) compare to Unity (My game development engine). For your reference, I have taken one example screenshot for better understanding.
In 3DS Max, its looking lighter and in cool colors. In Unity 3D, its looking darker and shiny colors.
If I check color code in Unity 3d, then it's proper it should require to look same but then why I was seeing all things in cool colors in 3DS Max!!!
In all 3d models, I was getting this kind of color difference when I import within the Unity game engine.
Because of this, the creation of an environment look and feel become really difficult for me.
In the above example, in both software, I didn't change any kind of default settings related to lighting or anything else.
What to do in this case for getting the exact same thing from 3DS Max to Unity 3D?
Try disabling Gamma correction in 3ds Max:
Rendering menu -> Gamma/LUT setup... -> Gamma and LUT tab -> Uncheck "Enable Gamma/LUT Correction" checkbox.
Default gamma of 2.2 can make colors appear washed out. This is actually important in a lot of architectural and realistic rendering scenarios, but not necessarily needed for games.
In Photoshop, increasing the "Unity" side of your image to a gamma of 2.2 seems to produce more consistent colors with the "3ds Max" side. However, there are also differences in lighting, light angle, and background color.
In the materials settings in Unity you can control which objects receive and cast shadows. It looks like some of your models aren't receiving or casting shadows. I'd also try to adjust the light directions like some of the other users said.
Also it should be easy to change the skybox from the light blue to a black in the Camera settings to match your max scene.
I think there is likely a lot of reasons, from material settings, lighting settings etc. One thing you can try is to switch your Unity Project from Gamma Space to Linear Space,
Edit>Project Settings>Player->Color Space. Linear Space usually improves the look in your scene allowing your objects to brighten linearly.
https://docs.unity3d.com/Manual/LinearRendering-LinearOrGammaWorkflow.html