Paged geometry lighting issues

Herb

16-06-2009 02:13:15

I'm trying to figure this one out... All my normal meshes look fine (lighting-wise), but when I place the same meshes in the same terrain using paged geometry, they appear too dark. The undersides of the pine tree branches for instance are almost black. The impostors look great, but when I get close and they change to 3D, they go too dark with parts being almost black. I keep thinking it's a lighting issue of some kind, but I'm not sure. I think it's lighting as the darker parts seem to be the undersides more, but really the whole mesh is darker than when it's a normal 3D mesh (not paged). I'm using Caelum, so its sun is doing the lighting on my terrain. I'm using ArtifexTerra3D for the texture splatting. Anybody have any ideas? I know the forest sample is doing something different, because when I put Caelum on that, at nighttime the terrain itself was still lit and my terrains using Artifex go dark when the Caelum sun goes down. Any help would be greatly appreciated. Thanks!

Herb

19-06-2009 16:01:45

Well, I figured it out. It was rather silly, but thought I'd share it in case someone else ran into it. This is what I had in my code that was the culprit:

mCaelumSystem->setManageAmbientLight (true);
mCaelumSystem->setMinimumAmbientLight (Ogre::ColourValue (0.1, 0.1, 0.1));

I don't know why that didn't effect my normal 3D meshes during the day, as far as making them really dark where the sun don't shine, because they were lit fine all around. But, for paged geometry it had a big impact. So, I bumped up the minimum ambient light, and it was happy.

The only problem with this solution is that the paged geometry stays lit during the night hours. I'm going to have to figure out how best to handle that still. :)

jacmoe

19-06-2009 17:23:46

The OpenFrag guys patched PagedGeometry for that.
I've tried it, and it works.
-> http://www.ogre3d.org/addonforums/viewtopic.php?f=14&t=7509&hilit=lighting

Herb

02-07-2009 14:18:35

Thanks jacmoe! I'll make a note to check that out this week. :)

tdev

03-07-2009 02:58:21

Thanks jacmoe! I'll make a note to check that out this week. :)
the patch was merged with SVN already, so just svn update / checkout :)