RE: [Algorithms] It looks terrible (was: Lightmap Terrain)
Brought to you by:
vexxed72
From: Phil B. <ph...@de...> - 2000-08-27 14:53:07
|
hey, i do the same thing as you except i have one directional light for the sun, cast the ray and then if it intersects don't add on the diffuse just leaving the ambient. i found i have to play with the sun's direction a lot to get good results - really long shadows seem to look a little weird for me. >For example, is there a way to have real penumbrae in the >shadows. this is a fudge but what i've been doing is creating 7 lightmaps and then do something like... GenerateLightmap( lightmap0, lightlist ); //x jitter by 10% JitterLights( lightlist, 0.1, 0.0, 0.0 ); GenerateLightmap( lightmap1, lightlist ); JitterLights( lightlist, -0.1, 0.0, 0.0 ); GenerateLightmap( lightmap2, lightlist ); //y jitter by 10% JitterLights( lightlist, 0.0, 0.1, 0.0 ); GenerateLightmap( lightmap3, lightlist ); JitterLights( lightlist, 0.0, -0.1, 0.0 ); GenerateLightmap( lightmap4, lightlist ); //z jitter by 10% JitterLights( lightlist, 0.0, 0.0, 0.1 ); GenerateLightmap( lightmap5, lightlist ); JitterLights( lightlist, 0.0, 0.0, -0.1 ); GenerateLightmap( lightmap6, lightlist ); and then just average all the lightmaps into a final one. all the jitter function is doing is changing the positions of the lights... like i said, it's a big hack but those hard shadows went soft immediately and look pretty good now. the downside of course is that it takes a long time to generate a final lightmap. >I could blur the image, but that just wouldn't be the same. i tried this before doing the above and couldn't get anything decent too. regards. Phil Bak ICQ:11204037 Tel:01908 393837 Email:ph...@de... Web:www.deepred.co.uk --- Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Klaus Hartmann Sent: 27 August 2000 14:29 To: gda...@li... Subject: [Algorithms] It looks terrible (was: Lightmap Terrain) Hi all, Please have a look at the following image (~310 KB): http://www.thecore.de/TheCore/shadows.jpg This lightmap looks majorly terrible, and I'm looking for ways to enhance this. I use the simple dot-product approach, and I have two light source. One light source (sun) is to the east, and the other ('anti' sun) is to the west. I use two light sources, because I don't like ambient. I compute the light for each texel, and then I cast a ray towards the sun (directional light). If this ray intersect with the surface before it reaches the sun, then I decrease the texel's intensity by some amount. I don't reflect or refract rays. I figured, that reflection probably wouldn't make much sense, because there's only a few cases where the reflected ray would hit the terrain again (or am I wrong?). How can I make this look better? For example, is there a way to have real penumbrae in the shadows. Of course, I could blur the image, but that just wouldn't be the same. Any ideas? Honestly... a simple dot-product (without shadows) looks more than twice as good (I can upload the same scene without shadows, if requested). Niki _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |