ands / lightmapper

A C/C++ single-file library for drop-in lightmap baking. Just use your existing OpenGL renderer to bounce light!
1.41k stars 133 forks source link

Lighting setup guide #7

Closed rasteron closed 7 years ago

rasteron commented 7 years ago

Is there a quick step or guide on how to setup different types of lighting, position, color, etc?

ands

ands commented 7 years ago

Apparently you are on the development branch which injects some blue emissive lighting into the initially black texture for testing purposes. If you want, you can do the same. Just render your objects with some colored (emissive) parts by painting into the textures that you render your objects with. You can also render light source meshes with emissive surfaces (just color them; e.G. a yellowish sphere that is placed relatively far away to emulate the sun). You can also set the clear color which would be like light coming from all directions. Using a skybox to light your scene is also a possibility (just render a skybox like in a regular game scene).

Most of this you would have to implement yourself into the example application, or, if you already have your own OpenGL renderer, you can integrate this library into your project and just render your scene as always to compute indirect lighting bounces.

Hope this helps :) (There is no guide or quick introduction other then the example, sorry. I might make a more useful application to show off what can be done at some point though).

rasteron commented 7 years ago

Hey @ands thanks and no worries! :smile: Noted on the development branch setup and I'll just do more tests.

Keep it up, this is awesome! :+1:

ands commented 7 years ago

Have fun ;) (what did you note on the development branch setup?)

rasteron commented 7 years ago

Ah yes, just this part that you mentioned :smile:

Apparently you are on the development branch which injects some blue emissive lighting into the initially black texture for testing purposes. If you want, you can do the same.

thanks.