Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

C3 SDK and effects do not support very good lighting. So, we have to do a few compromises. For flat lighting of the 3DObject, you can have multiple lights, including spot lights. However, the only work on a per face basis. So, for example on the building above each side is a single face with texture, so each face only have a single light value for the entire face, so you won't get nice liking like you have above.

You could subdivide the walls into many triangles and it could start to look like the above, however, that requires a lot of performance to do. I find that the 3DObject lighting works best on a little more complicated, animated models.

This lighting is world space lighting (e.g. the lights can be placed in the world and they work as expected as you change the camera location). These are ACEs of 3DObject.

The other option is the screenspace lighting. This lighting is done by looking at the depth normals of the screenspace and using though to determine lighting on a fragment (e.g. pixel) basis. It look pretty nice, but it has the restriction that the light _will_ change as the camera changes orientation (the lighting is _not_ world based). So, in general it works better for some ambient, distant lighting and lighting sources that are coming from the direction of the camera. This is an effect addon.

Some other ideas to think about: bake in lighting on 3d models. For example in the above, if the lighting doesn't change you could bake the lighting into the textures in blender, etc.

Okay, that helped me understand a bit, I think the idea of doing the lighting on the textures is valid and simpler to do.