Try my new website: www.urcho.com - the new SIMPLE social network
blitz code snippets Sign up | 357 members | 125 snippets
Search for:

Username:
Password:


Omni LightNormal Mapper by AntMan - Banned in the line of duty.

[back]
Author: Archive | Viewed: 508 times | Language: BlitzBasic 3D | Category: 3D Effects
Author Comments:
This is an engine, not an app. Its very easy to use, you just define light sources, caster meshes and reciever meshes. for lightmapping. the lightmapping uses a custom leaf texture packer to pack the lightmap into one big texture. You can define how many pixels(I.e 16x16) each poly in the scene gets. The lightmapper uses a custom projected 2d volume technique to determine which lumels are shadowed, rather than using linepicks. The normal mapper generates a per-pixel normal map for the scene, again using the leaf texture packer. This allows you to do per-pixel lighting. Best suited to characters/props, rather than whole levels.(Thats what the lightmapper is for.) Although it does work pretty nicely on most small rooms(And terrains). Included is EntityLight, this function transposes a light into object space and sets its normal vector(I.e entityColor) to point towards the light source. (I.e map your mesh, setup the textures, and then simply use entityLight once per frame for per pixel lighting)
Login or create an account to comment on this snippet