Per vertex & per pixel lighting

Miscellaneous Forums/General Discussion/Per vertex & per pixel lighting

What are the differences?. Which method should I use?

Thanks!

The difference is exactly what it sounds like. Per pixel lighting means that the lighting value at each pixel can be different. Per vertex lighting means that the lighting value at each vertex can be different, and everything inbetween is just interpolated between the two.

There's no one answer to which you should use. If you're using Blitz3D you should use per-vertex lighting for dynamically lit objects as anything else is cludgy and broken at best. For static objects, you can use either per-pixel ( lightmapped ) or per-vertex, depending on what suits best.

If you're using more powerful 3D engines, then you'll probably want to be using per-pixel lighting, but even then you might find that per-vertex lighting and lightmaps is good enough. Unless you've got the ability to create normal maps for every surface or you can afford to use some kind of expensive dynamic ambient occlusion shader, you're not going to see huge benefits from per-pixel lighting.

I tries per pixel lighting on a 3d animated character a while back. From the results i had though, it was very expensive process, and didn't justify the result. 3 additional renders minimum for the cubemap lighting on the character, and i couldn't manage to effectively make the lighting NOT specular, so the character looked shiney, even with the extended blend modes available in the FastExtend module.

As Gab says, it's great for things that will remain static :o) Very expensive for moving/animated situations, because of the work arounds.

I refer to blitz3d in the above btw.h

Thank you guys. From your words I suppose that per-pixel lighting is better to more powerful PC's
EDIT: To be honest I should say that I am playing last days with TV3D engine...
You can initialize a module for per pixel AND another one per vertex lighting.
I am not sure if I can use them both modules