• General Chat
  • Light and environment setup for 3d low poly style game

Hi guys,

I am making a 3d game and I want to have a style close to Crossy Road in terms of lighting and shading (flat shadows).

What are your recommendations on the material/lighting/environment setup? All my materials have a roughness of 1 and I have a directional light with shadows enabled.

Thanks

For starters, you can simplify the lighting quite a bit with your own shader. Or you can tweak the standard material, but the idea would be to have a fairly high ambient light component in the enviornment. The light itself should be to the left and up from the camera, in your picture the light is too far away which is making everything too dark.

For the shadows you can change the filter mode and resolution in project settings. Crossy Road shadows look really sharp, I don't if they are doing something special (stencil shadows, or decals, not sure). They do look sharper than typical shadow mapping.

Hi,

@jbrooks79 said: You need to increase anti-aliasing, so the stylized shadows look sharp, in project settings, under quality, msaa . . Set it to 2x, or 4x, until it looks good . .

This is strange because changing the Msaa value changes literally nothing for the shadows. Does the "Directional Shadow > Size" parameter changes anything? (it's also doing nothing...)

Should I use no filter for the shadows (instead of PCF5)?

@jbrooks79 said: Otherwise, use a consistent color palette, when making the textures, and it should work, I hope . . .

What do you mean by saying consistent color palette?

@cybereality said: The light itself should be to the left and up from the camera, in your picture the light is too far away which is making everything too dark.

It looks like the position of the directional light is not changing the way it affects the world is that right?

@cybereality said: For starters, you can simplify the lighting quite a bit with your own shader.

Should I write a shader for the light or for the plane? (I don't really know how shader works internally...)

Thanks !

@johhnry said: This is strange because changing the Msaa value changes literally nothing for the shadows. Does the "Directional Shadow > Size" parameter changes anything? (it's also doing nothing...)

Should I use no filter for the shadows (instead of PCF5)?

Indeed, MSAA only affects the final viewport/display output. Nothing todo with shadows. You might want to tweak the shadow settings indeed.

https://docs.godotengine.org/en/3.1/tutorials/3d/lights_and_shadows.html

@johhnry said: It looks like the position of the directional light is not changing the way it affects the world is that right?

That's right. Only it's orientation really matters.

@cybereality said: For starters, you can simplify the lighting quite a bit with your own shader.

Should I write a shader for the light or for the plane? (I don't really know how shader works internally...)

I think spatialmaterial was meant by @cybereality here. So for the meshinstance nodes.

Sorry. That was confusing what I wrote.

Correct, for directional light the position doesn't matter. I meant that the light is in a strange angle (lighting the back of the character) so that is why it looks off from the reference. You should try rotating the light so that it is facing down and more to the side of the character (not facing the back).

Probably writing your own shader is not needed. Though it may give you a more custom look, if you are not familiar with it, I'm sure there is a way to tweak the settings in Godot to get something better.

You might want to play with the environment node a bit. You can set ambient light strength and color, sky energy, and stuff like that so your scene isn't so dark. Upping the energy on the directional light should also make it look less washed out.

Sorry for the confusion.