armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

## Recommended Posts

Welcome, to a very long tutorial on how to make your Unity3D games look "better". I say "better" because not everyone's art styles appeases to realism and I will respect anyone's artistic style here.

Now this post will cover the following topics and will be updated on a day-to-day basis so make sure to stop by and read up on the updates.  The Unity Pro related topics will be highlighted with PRO next to them.

• Directional Lighting
• Ambient Lighting
• Global Illumination
• H.D.R.
• Tonemapping
• Bloom
• Image Processing
• Reflections
• Textures
• Anti-Aliasing
• Translucency
• Miscellaneous Materials
• Physically-Based Rendering

Alright, so these topics will not be typed up in any particular order. The first topic I will cover will be an easy one, which is directional lighting.

Directional Lighting in Unity3D is simply a light vector in 3D space, more specifically in world space, disregarding shadows, that cast lighting on all objects. This form of lighting is approximated with the function NdotL, or the dot product between the light vector and the normal of the objects. Where θ is the angle between them known as the angle of incidence. Without using the cosine function, we discovered the dot products of these two vectors are equal to the cos(θ).

This NdotL is a very cheap approximation of subsurface scattering, also known as diffuse. Diffuse meaning scatter or spread. It is a way to account for the Sun and is often tinted with a light color to give artist freedom in what color the "Sun" is. This is commonly known in video games as Lambertian shading. It can be coded as such (Cg) :

With a "Sun" in our games giving us an approximation to diffuse lighting, it also gives us the opportunity to create shadows. Shadows are a crucial part in video games. You are allotted 1 Directional Light with Hard Shadows in Unity Free so make sure your taking advantage of the opportunity!

Example of Directional Lighting:

• 19

##### Share on other sites

nice ambient lighting very nice

##### Share on other sites

I am really looking forward to more!

##### Share on other sites

Looking forward to more

##### Share on other sites

This seems like a pun

##### Share on other sites

willywill plz have my babies

##### Share on other sites

(grabs popcorn)...

##### Share on other sites

I'll be updating the post by tomorrow sorry for the delay

##### Share on other sites

Awesome explanation Continue your awesome work ...

##### Share on other sites

Oh, I can't wait.

##### Share on other sites

When will be post updated?

##### Share on other sites

... Looking forward to this

##### Share on other sites

my internet connection being throttled. Stop Tom Wheeler, save the internet!

We must stop Tom so willis can finish this! THE BATTLE HAS BEGUN

very nice

##### Share on other sites

Lets somehow boycott the internet, after Willy is done of course.

##### Share on other sites

I got a great info, use Sonic Ethers bloom and put some bloom on objects like lamps, also place much light sources, this sounds soo simple but it increases quality alot, atleast in my opinion.

Here are some scenes from the pfps with more lights, bloom, dirty lens and a really dark night :

The image quality is a bit low because imgur compresses them, but it looks better ingame

im posting this here cuz it fits and i want willywills opinion on it :3

##### Share on other sites

For my opinion lens dirtiness is too big.

##### Share on other sites

it actually looks AWESOME.

##### Share on other sites

Here is my opinion, in a nutshell. Do not use "Physically motivated" bloom that's based from a camera, in a first person game based from a persons eyes. His bloom doesn't use an Airy disc method anyway, kinda lied. Airy disc is a PSF (Point spread function) that requires a lot of math and double precision. His shader has none of that. So its an approximation of an approximation to camera bloom. Not an approximation of eye bloom. Very different things to be used in very different situations. Now besides all that his bloom looks nice. Although with better bloom out of they way you should focus on proper materials, better textures and lighting.

##### Share on other sites

It does look pretty good, a huge improvement over Unity's default bloom. The screenshot of bloom with the explosion annoys the hell out of me though.

##### Share on other sites

I'll sound lioke a total noob, but how to apply this ambient lighting?

##### Share on other sites

Well. As I understood tutorial, I have to edint Lighting.cginc, right?

##### Share on other sites

Your wrong, you have to edit Internal-PrePassLighting which is unity pro only

Edited by Frosty5

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.