3D engine real-time lighting. How would you do it?

Miscellaneous Forums/General Discussion/3D engine real-time lighting. How would you do it?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This only applies to per-vertex lighting techniques obviously (which Blitz3D is limited to, since you can't use pixel shaders)

That's good news to me though, coz my system bypasses the high-polys - which is basically what the other methods are doing.

It's all new to me and I am not sure if anything I am doing is remotely standard, so I might just carry on the route I am going. My geometry is being decoded from internal data - ie:

mesh_piece=Int(chunk/10000)
chunk_calc=mesh_piece*10000
new_chunk=chunk-chunk_calc
chunk_calc=new_chunk+1000
new_chunk=chunk_calc/100
mesh_length=new_chunk-10
mesh_height=chunk_calc-(new_chunk*100)

That is basically creating a wall/floor/ceiling - I'm using what I call a 'chunk' system - the geometry is basically chunks that I encode as data and then decode on-the-fly - Well there is a bit more to the code - that is initilisation before it flies off to be constructed.