Jagged edges SkyBox realtime - unity3d

I'm Completely new at setting up lights,
I have tried to adjust settings following several tutorials
but fail to find how to correct jagged objects have non crisp look
1 Unity unit = 1 meter (100cm)
Linear rendering mode is used Deferred
HDR is enabled for camera
Deferred rendering mode is used
Post Process package is installed
Enable Color Grading > Tonemapper > ACES
Help appreciated!

I altered the scene to add light probes + reflection probes,
Set static objects. Its seems to be better, although it would be nice to find how to speed up baking times... happier with the result though
In the light mapping settings I set
Direct Denoiser to OpenImageDenoise
Indirect Denoiser to OpenImageDenoise

Related

Collision / Rigidbody not working properly in small objects

I have this simple domino scene where you can click a domino and apply a force to knock it.
At first I had this dominoes in a scale of (x=0.1), (y=0.6), (z=0.3) 1 is supposed to be 1 meter, they fell without a problem but too slow. According to unity documentation on Rigidbody this made total sense.
Use the right size.
The size of the your GameObject’s mesh is much more important than the mass of the Rigidbody. If you find that your Rigidbody is not behaving exactly how you expect - it moves slowly, floats, or doesn’t collide correctly - consider adjusting the scale of your mesh asset. Unity’s default unit scale is 1 unit = 1 meter, so the scale of your imported mesh is maintained, and applied to physics calculations. For example, a crumbling skyscraper is going to fall apart very differently than a tower made of toy blocks, so objects of different sizes should be modeled to accurate scale.
So I just re sized the dominoes to (x=0.01), (y=0.06), (z=0.03), this time they fell to the desired speed but for some reason they stop falling and don't knock the next domino.
example GIF
I don't know why this is happening but i can guess that this is because at the time of calculating physics the engine doesn't waste so much resources in calculating small objects that are probably not even going to be seen by the user.
Modifying mass doesn't seem to do anything, also draw and angular draw are both 0 and already tried every collision detection mode.
Is there any solution or workaround for this?
In my experience, Unity physics doesn't like too small objects since it introduces rounding errors. A game simulation usually does not need the same accuracy as when you try to land on Mars. Therefore, I usually avoid scales less than 0.1f.
In your case, I would keep the scales at 1.0f and instead experiment with either increasing the world gravitation, changing it from the default -9.81f to -98.1f (Edit - Project Settings - Physics). Or changing the default Time Scale from 1f to 5f (Edit - Project Settings - Time).
Try not to make too big changes in the beginning since it might introduce strange effects on other parts of the gameplay.

RTX Recursive Rendering

I am trying to achieve nice looking reflections with the unity RTX capabilities. Under the volume component, I have turned on recursive rendering:
I then set my material's rendering pass to be raytracing. The setting only allows for a ray length of 50 and I appear to get weird artefacts:
Does anyone have an idea what I'm doing wrong? What is that weird line and how do I blend it? How do I get rid of the black when an intersection exceeds the ray's length of 50 units?
Cheers!
For the first issue, I found a fix. It has to do with the light cluster: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition#7.1/manual/Ray-Tracing-Light-Cluster.html

why I cant choose stretched_billboard render mode in the script?

I am trying to change particle render mode in the script but I cant choose stretched_billboard mode but it is possible to change in the editor.
ps = GetComponent<ParticleSystem>();
psr = GetComponent<ParticleSystemRenderer>();
psr.renderMode = ParticleSystemRenderMode.Stretch;
this works fine
psr.renderMode = ParticleSystemRenderMode.StretchedBillboard;
there isn't StretchedBillboard option.
Thanks in advance.
I think that StretchedBillboard is a combination of the default renderer model (Billboard) and a non-zero scaling applied to the camera. So, through code, you should be able to reproduce it with a combination of these two values.
In fact, look at the documentation, stretched billboard is explained as the billboard mode, but with the applied scaling:
Looking at the ParticleSystemRenderer's APIs, there's the cameraVelocityScale attribute (How much are the particles stretched depending on the Camera's speed.). There's also a snippet that should give a proper example.
I hope this could help you out.

How do I get a Light's Range value in Shader?

I'm trying to write a simple frag/vert shader that, depending on whether it is in the range of a light, will paint the appropriate colour from either the 'lit' texture or from the 'unlit' texture.
Therefore, I need to compare the distance between the light to the range of the light.
I've been googling all kinds of things, but I can't seem to find a way of accessing the range value of the light. Is there a way to do so? If not, is there some kind of derived data I could use as an alternative?
Update
I was able to find this method here, which seems to be the most promising so far, however after playing around for a bit, I still can't seem to get what I need. There's some talk about _LightMatrix0 not being populated. Can anyone confirm?
Update 2
I found the variable unity_LightAtten in the Unity Shader Variables documentation. However, this is only used for Vertex Lit shading, which isn't exactly ideal, especially considering the lack of console support.
Could there be a way to pipe this variable to Forward Rendering?
You can pass Light.range into the shader using Material.SetFloat. You need to attach a script to do that.

How to increase frames per second in low poly simple game?

I'm struggling with performance in unity. I created a very simple game scene. Very low poly. 2 light sources, 1 Directional 1 Point, I have the Standard Shader with Alberdo and Occlusion texture set (this for all few 3D objects in the scene)
The issue is, I was expecting fps to be around 60 but it is 29ish..
What things I have to consider regarding performance in this scenario? it is very frutstating since it is a very, very simple scene
see images:
In your Quality settings, as mentioned by Hamza, set shadow resolution to medium setting and set V sync count to "Dont sync".