Lighting terrain

DarkHorizon

17-01-2008 02:24:57

Hello,

I have just begun using the Paged Geometry 1.0 add-on, and have successfully set up my project to render the world map I have devised.

I have also combined my project with the Caelum sky-rendering add-on.

The issue I have noted is that Caelum lights models appropriately, however terrain and tree models are managed entirely differently.

Since my ultimate goal is to have the terrain shading (at least slightly) matching Caelum's time-based lighting scheme, what is the method I should be looking for? Is normal data generated by Paged Geometry? Should I instead be looking for (maybe interpolated) lightmaps?

I also noted the presence of a (commented out) VertexNormals setting in the .cfg file; is this a future/planned feature?

Best regards, and thanks for an excellent add-on!

JohnJ

17-01-2008 03:14:12

Unfortunately, PagedGeometry simply does not support dynamic day/night lighting at all right now, so there's not much I can do to help. I do intend to research and implement dynamic lighting in the future, since I know there are many who would like Caelum integrated with PagedGeometry more tightly.

Until then, you'll have to modify PagedGeometry yourself to suit the needs of your dynamic lighting. I know "hotgloupi" and some others has been modifying PagedGeometry to work better with dynamic lightmaps, etc. (See [b]this[/b] thread).

what is the method I should be looking for?
Dynamic lighting can be a complex topic when combined with the optimization techniques PagedGeometry uses, so there are many different techniques to achieve dynamic lighting. If you have dynamic terrain lightmaps available, you could modify PagedGeometry to accept these. Another way would be to tint the impostors the color of the current atmospheric lighting effect, to make them appear as though they're being lit along with the batched geometry. The grass system would need a normal component added, probably always pointing up, in order for it to be effected by lights.

I also noted the presence of a (commented out) VertexNormals setting in the .cfg file; is this a future/planned feature?
Since the PagedGeometry examples don't use any .cfg files, I assume you're referring to the terrain.cfg file. This has nothing to do with the rendering of trees/grass/etc. - it's just used to setup Ogre's default terrain engine (which doesn't really support true dynamic lighting).